@tpp/simple-uuid

1.0.0 • Public • Published

Simple UUID

This is a simple UUID generator that has zero dependencies and works everywhere.

Usage

Install it first:

$> npm i @tpp/simple-uuid

Then use it to generate a simple and unique id:

let uuid = require('@tpp/simple-uuid')
uuid()
// '3insalcl'
uuid(100)
//'mw8kcgh739zhjs5g2lujpiv1ey2jv8onr4olzvgxishd8k6vv6fm8bycvixlbux4651qg8vxt26srcnxbw08sexutbir5rjbnwko'

It detects NodeJS’s crypto module, or the browsers crypto functionality where available and falls back to Math.random if needed.

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @tpp/simple-uuid

      Weekly Downloads

      2

      Version

      1.0.0

      License

      ISC

      Unpacked Size

      2.64 kB

      Total Files

      3

      Last publish

      Collaborators

      • tpp