Official Threadbase SDK for TypeScript/JavaScript
Repo-native persistent memory for AI-assisted software development.
```typescript const mutex: MutexBase; // 获取 key 等待锁, (最多尝试获取30次,每次间隔在10~20毫秒),获取不到则抛出异常 const unlock = await mutex.lock({ key: 'key', tryCount: 30, sleepRange: [10, 20] }); await unlock(); // 释放锁
Array#isArray for older browsers
ECMAScript AST recursive visitor
deterministic `JSON.stringify()` - a faster version of substack's json-stable-strigify without jsonify
Light ECMAScript (JavaScript) Value Notation - human written, concise, typed, flexible
JSON parse & stringify that supports binary via bops & base64
Run a function exactly one time
Buffers events from a stream until you are ready to handle them.
CLI arguments parser. Native port of python's argparse.
Get the command from a shebang
Resolve the path of a module like `require.resolve()` but from a given path
Callback wrapping utility
Allows users to use generators in order to write common functions that can be both sync or async.
Returns true if a string has an extglob.
The Node.js `util.deprecate()` function with browser support
Fast deep equal
type-check allows you to check the types of JavaScript values at runtime with a Haskell like type syntax.
deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results, with no public domain dependencies
A small polyfill for Object.setprototypeof
process.nextTick but always with args
Pass two numbers, get a regex-compatible source string for matching ranges. Validated against more than 2.78 million test assertions.
Normalize slashes in a file path to be posix/unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes, unless disabled.