Options
All
  • Public
  • Public/Protected
  • All
Menu

human-readable-keys

Generate human readable keys such as correct-dolphin-5782!

NOTE: By default, there are 213 * 960 * 9999 = 2,044,595,520 possible IDs.

Install

{pnpm/npm/yarn} install human-readable-keys

Index

Functions

Functions

Const default

  • default(numberMax?: number): string
  • Generate a random human-readable ID.

    import hrid from "human-readable-keys";
    const id = hrid();
    

    Parameters

    • numberMax: number = 9999

      Maximum value for the numeric part of the ID. Defaults to 9999. Note that values are automatically padded to the number of digits in the maximum value.

    Returns string

    generated ID as a string

Legend

Generated using TypeDoc