Socket
Socket
Sign inDemoInstall

@sanity/uuid

Package Overview
Dependencies
Maintainers
38
Versions
384
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/uuid

Simple generation of sanity document IDs


Version published
Weekly downloads
98K
decreased by-26.34%
Maintainers
38
Weekly downloads
 
Created

What is @sanity/uuid?

@sanity/uuid is a utility package for generating and validating UUIDs (Universally Unique Identifiers). It provides simple and efficient methods to create UUIDs and check their validity, making it useful for applications that require unique identifiers for objects, sessions, or other entities.

What are @sanity/uuid's main functionalities?

Generate UUID

This feature allows you to generate a new UUID. The `uuid` function generates a random UUID each time it is called.

const { uuid } = require('@sanity/uuid');
const newUuid = uuid();
console.log(newUuid);

Validate UUID

This feature allows you to validate whether a given string is a valid UUID. The `isUuid` function returns true if the string is a valid UUID, and false otherwise.

const { isUuid } = require('@sanity/uuid');
const valid = isUuid('123e4567-e89b-12d3-a456-426614174000');
console.log(valid);

Other packages similar to @sanity/uuid

Keywords

FAQs

Package last updated on 27 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc