Options
All
  • Public
  • Public/Protected
  • All
Menu

Module uniqueId

Index

References

Functions Util

References

Renames and re-exports __type

Util Functions

  • uniqueId(prefix?: string): string
  • Generates a unique ID. If prefix is given, the ID is appended to it.

    since

    5.12.0

    see

    random

    example
    uniqueId('contact_')
    // => 'contact_104'

    uniqueId()
    // => '105'

    Parameters

    • prefix: string = "$lodash$"

      The value to prefix the ID with.

    Returns string

    Returns the unique ID.