🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

is-uuid

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

is-uuid

UUID check for Node and the browser

1.0.2
latest
Source
npm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
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

UUID

FAQs

Package last updated on 21 Dec 2015

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