README
UUID
In order to create a unique id, you need to generate a unique string so the best way for it as RFC 4122 said is to use UUID. This package will generate a unique id according to RFC 4122 schema in pure js. The main source of this project is based on the StackOverflow community wiki.
For the sake of compatibility it do not use crypto anymore since the v1.1.2
.
How it works?
To install it you can simply do the following command:
npm i @smakss/uuid
or
yarn add @smakss/uuid
to include it with common js module you should do this:
var uuid = require('@smakss/uuid');
and to include it with ECMAscript module you can simply do this one:
import uuid from '@smakss/uuid';
then to use it within your application you can do it just like this:
uuid();
// Result: '289c653f-6c89-416c-8d82-c03f7e47340c'
Demo
You can check the working demo in runkit.