mnm-uuid

1.0.3 • Public • Published

This module creates a uuid based on the the Date Object in JS. We get the current time in milliseconds and convert to a String data type. We then convert that string into kind of a hash, using the crypto module.

Usage


const uuid = require("mnm-uuid");

let refId = uuid(); // this returns a short id (17 characters default) that can be pretty much used for anything like a reference id... 

alternatively, we can make this uuid longer by adding parameters to the function


let longerRefId = uuid(4, 7, "."); 


/mnm-uuid/

    Package Sidebar

    Install

    npm i mnm-uuid

    Weekly Downloads

    9

    Version

    1.0.3

    License

    ISC

    Unpacked Size

    1.43 kB

    Total Files

    3

    Last publish

    Collaborators

    • mmichaelnorward