Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@sanity/uuid

sanity-io476.3kMIT3.0.2TypeScript support: included

Simple generation of sanity document IDs

sanity, cms, headless, realtime, content, uuid

readme

@sanity/uuid

Generate a valid Sanity document ID

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