Socket
Socket
Sign inDemoInstall

is-uuid

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    is-uuid

UUID check for Node and the browser


Version published
Weekly downloads
52K
decreased by-25.19%
Maintainers
1
Install size
128 kB
Created
Weekly downloads
 

Readme

Source

is-uuid

UUID check for node and the browser

Usage

Specific UUID version

const isUUID = require('is-uuid');

isUUID.v1('857b3f0a-a777-11e5-bf7f-feff819cdc9f'); // true
isUUID.v2('9a7b330a-a736-21e5-af7f-feaf819cdc9f'); // true
isUUID.v3('0a7b330a-a736-35ea-8f7f-feaf019cdc00'); // true
isUUID.v4('c51c80c2-66a1-442a-91e2-4f55b4256a72'); // true
isUUID.v5('5a2de30a-a736-5aea-8f7f-ad0f019cdc00'); // true

Any non-nil UUID version

// returns true for v1 - v5 UUID. Will return false for nil UUID
isUUID.anyNonNil('c51c80c2-66a1-442a-91e2-4f55b4256a72'); // true

Nil UUID check

// returns true for nil UUID
isUUID.nil('00000000-0000-0000-0000-000000000000'); // true

Keywords

FAQs

Last updated on 21 Dec 2015

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc