• Generate URL-friendly unique ID. This method uses the non-secure predictable random generator with bigger collision probability.

    import { nanoid } from 'nanoid/non-secure'
    model.id = nanoid() //=> "Uakgb_J5m9g-0JDMbcJqL"

    Returns

    A random string.

    Parameters

    • Optional size: number

      Size of the ID. The default size is 21.

    Returns string

Generated using TypeDoc