Skip to content

A simple mixin that adds uuid checking and generation to Lo-Dash

License

Notifications You must be signed in to change notification settings

brandonscript/lodash-uuid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lodash-uuid

A simple lodash mixin that supports validation and generation of uuids.

 npm install lodash-uuid

This is a slimmed down copy of lodash-mix that only supports functions specific to uuids.

usage

_.uuid

_.uuid()
// generates an RFC 4122 compliant version 4 uuid.

_.isUuid

_.isUuid('262182b1-f92c-42bd-ab39-8faedb47b4dc')
// produces true|false. Validates any version of uuid.

_.isUuid4

_.isUuid('262182b1-f92c-42bd-ab39-8faedb47b4dc')
// produces true|false. Validates an RFC 4122 compliant version 4 uuid.

tests

Tests run in node and the browser. Browserify and tape must be installed globally.

Execute from the command line

npm install -g tape
tape test/**/*.js

About

A simple mixin that adds uuid checking and generation to Lo-Dash

Resources

License

Stars

Watchers

Forks

Packages

No packages published