API Reference / @evolu/common / NanoId / NanoIdLib
Interface: NanoIdLib
Defined in: packages/common/src/NanoId.ts:20
Interface representing a NanoId library.
It's useful for testing by allowing ID generation to be mocked, ensuring consistent results.
See
Example
const foo = createFoo({
...createNanoIdLib(),
...createTime(),
});
Properties
Property | Modifier | Type | Defined in |
---|---|---|---|
customAlphabet | readonly | (alphabet , defaultSize? ) => (size? ) => string | packages/common/src/NanoId.ts:23 |
nanoid | readonly | (size? ) => string | packages/common/src/NanoId.ts:28 |
urlAlphabet | readonly | string | packages/common/src/NanoId.ts:21 |