@fczbkk/uuid4

3.0.0 • Public • Published

UUID4

Generator and validator for Universally Unique Identifier v4 (random).

How to use

Install the library via NPM:

npm install @fczbkk/uuid4 --save

Then import to your Javascript:

import {genrate, validate} from '@fczbkk/uuid4';

// generate UUID4 identifier
const my_id = generate();  // e.g. 4414b07a-d8ae-4763-a7e2-aa66cb0dc3d0

// validate UUID identifier
validate(my_id);  // true
validate('xxx');  // false

Documentation

validate

Checks if provided id is valid UUID4.

Parameters

Returns boolean

generate

Generates new valid UUID4 identifier.

Returns string

Bug reports, feature requests and contact

If you found any bugs, if you have feature requests or any questions, please, either file an issue at GitHub or send me an e-mail at riki@fczbkk.com.

License

UUID4 is published under the MIT license.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.0
    724
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.0
    724

Package Sidebar

Install

npm i @fczbkk/uuid4

Weekly Downloads

92

Version

3.0.0

License

MIT

Last publish

Collaborators

  • fczbkk