1.3.5 • Published 5 years ago

@zhangfuxing/isuuid v1.3.5

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

isuuid

uuid verification

Install

$ npm i @zhangfuxing/isuuid

Useage

/**
 * @param {String} str String to be verified
 * @param {Number | String} [version] optional, version of uuid, can be: 1, 2, 3, 4, 5, '1', '2', '3', '4', '5'
 * 
 * @returns {Boolean}
 */
isuuid(string[, verison])

Exmaple

const isuuid = require('@zhangfuxing/isuuid');
const str = '857b3f0a-a777-11e5-bf7f-feff819cdc9f';

// is uuid
isuuid(str);  // true

// is uuid v1
isuuid(str, 1);  // true

// is uuid v2
isuuid(str, 2);  // false

// is uuid v3
isuuid(str, 3);  // false

// is uuid v4
isuuid(str, 4);  // false

// is uuid v5
isuuid(str, 5);  // false
1.3.5

5 years ago

1.3.4

5 years ago

1.3.3

5 years ago

1.3.2

5 years ago

1.3.1

5 years ago

1.3.0

5 years ago

1.2.1

5 years ago

1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago