Skip to main content Link Search Menu Expand Document (external link)

NanoId overview

Added in v1.0.0


Table of contents


utils

NanoId

Signature

export declare const NanoId: Brand.Brand.Constructor<NanoId>

Added in v1.0.0

NanoId (type alias)

Signature

export type NanoId = string & Brand.Brand<"@typed/id/NanoId">

Added in v1.0.0

NanoIdSeed (type alias)

Signature

export type NanoIdSeed = readonly [
  zero: number,
  one: number,
  two: number,
  three: number,
  four: number,
  five: number,
  six: number,
  seven: number,
  eight: number,
  nine: number,
  ten: number,
  eleven: number,
  twelve: number,
  thirteen: number,
  fourteen: number,
  fifteen: number,
  sixteen: number,
  seventeen: number,
  eighteen: number,
  nineteen: number,
  twenty: number
]

Added in v1.0.0

isNanoId

Signature

export declare const isNanoId: (id: string) => id is NanoId

Added in v1.0.0

makeNanoId

Signature

export declare const makeNanoId: Effect.Effect<NanoId, never, GetRandomValues>

Added in v1.0.0

makeNanoIdSeed

Signature

export declare const makeNanoIdSeed: Effect.Effect<NanoIdSeed, never, GetRandomValues>

Added in v1.0.0

nanoId

Signature

export declare const nanoId: (seed: NanoIdSeed) => NanoId

Added in v1.0.0