1.0.2 • Published 1 year ago

check-is-guid v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

isGuid

A small package for checking if a string is a valid GUID.

Installation

npm install check-is-guid
yarn add check-is-guid

Usage

const checkIsGuid = require('check-is-guid');

checkIsGuid('f4090a94-1774-46d7-b469-109ddec68cd2'); // true
checkIsGuid('f4090a94-1774-46d7-b469-109ddec68cd'); // false
import checkIsGuid from 'check-is-guid';

checkIsGuid('f4090a94-1774-46d7-b469-109ddec68cd2'); // true
checkIsGuid('f4090a94-1774-46d7-b469-109ddec68cd'); // false

Optional Arguments

Add an optional version argument to also confirm the GUID is a specific version.

checkIsGuid('f4090a94-1774-46d7-b469-109ddec68cd2', {version: 4}); // true
checkIsGuid('f4090a94-1774-46d7-b469-109ddec68cd2', {version: 5}); // false
1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago