uid-pool
Version:
High-performance UUID and unique ID pooling for Node.js. Pre-generate IDs in background worker threads for O(1) synchronous acquisition. Drop-in replacement for uuid.v4() and nanoid() with 10-100x better performance under load.
17 lines • 699 B
TypeScript
import type { IdPoolOptions } from "../core/types.js";
import type { IdPool as NodeIdPool } from "../node/index.js";
import type { IdPool as EdgeIdPool } from "../edge/index.js";
type IdPoolImplementation = NodeIdPool | EdgeIdPool;
/**
* Create a new IdPool instance that is ready for use.
* Automatically detects the runtime and uses the appropriate implementation.
*/
export declare function create(options: IdPoolOptions): Promise<IdPoolImplementation>;
/**
* IdPool factory for creating ID pools with runtime auto-detection.
*/
export declare const IdPool: {
create: typeof create;
};
export type { IdPoolOptions, PoolStats } from "../core/types.js";
//# sourceMappingURL=index.d.ts.map