index.d.ts 371 B

12345678910111213141516171819
  1. declare namespace cuid2 {
  2. export function getConstants(): {
  3. defaultLength: number
  4. bigLength: number
  5. }
  6. export function init(options?: {
  7. random?: () => number
  8. counter?: () => number
  9. length?: number
  10. fingerprint?: string
  11. }): () => string
  12. export function isCuid(id: string): boolean
  13. export function createId(): string
  14. }
  15. export = cuid2;