@mdenic/uniqid

1.0.2 • Public • Published

@mdenic/uniqid

npm (scoped) npm bundle size (minified) NPM npm GitHub top language GitHub last commit

A super simple, lightning fast unique id based on the current timestamp in milliseconds, with optional prefix and suffix.

Install

$ npm install @mdenic/uniqid

Usage

var uniqid = require("@mdenic/uniqid");

uniqid();
//=> "1558604880081" //string

uniqid('hello-');
//=> "hello-1558604880081" //string

uniqid('', '-world');
//=> "1558604880081-world" //string

uniqid('hello-', '-world');
//=> "hello-1558604880081-world" //string

Options

Name Type Default Value
prefix String ''
suffix String ''

Readme

Keywords

Package Sidebar

Install

npm i @mdenic/uniqid

Weekly Downloads

0

Version

1.0.2

License

MIT

Unpacked Size

2.14 kB

Total Files

3

Last publish

Collaborators

  • mdenic