Napoleon's Pixelated Mugshot

    @smakss/uuid

    1.2.2 • Public • Published

    UUID

    npm Snyk Vulnerabilities for npm package NPM npm npm bundle size (scoped)

    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.

    Install

    npm i @smakss/uuid

    DownloadsWeekly Downloads

    4

    Version

    1.2.2

    License

    MIT

    Unpacked Size

    4.87 kB

    Total Files

    7

    Last publish

    Collaborators

    • smakss