npm.io
3.0.3 • Published 3 weeks ago

@sanity/uuid

Licence
MIT
Version
3.0.3
Deps
1
Size
4 kB
Vulns
0
Weekly
0
Stars
1

@sanity/uuid

This package is no longer needed/encouraged - use crypto.randomUUID() or the uuid npm module directly.

Generate a valid Sanity document ID (uuid v4 format)

Installation

$ npm install @sanity/uuid
// or
$ yarn add @sanity/uuid

Usage

import {uuid} from '@sanity/uuid'

const id = uuid()
console.log(id)
//=> 76dc5edf-9c43-4bab-a62d-4a2cad650053

License

MIT Sanity.io

Keywords