Skip to content

Replace uuid with crypto.randomUUID() #2275

@trivikr

Description

@trivikr

Replace uuid with crypto.randomUUID()

Example

import {v4 as uuid} from 'uuid'

crypto was added globally as follows:

  • v23.0.0 | No longer experimental.
  • v19.0.0 | No longer behind --experimental-global-webcrypto CLI flag.
  • v17.6.0, v16.15.0 |  Added in: v17.6.0, v16.15.0

Docs: https://nodejs.org/api/globals.html#crypto

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions