1.0.2 • Published 4 years ago

@mdenic/uniqid v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

@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

NameTypeDefault Value
prefixString''
suffixString''
1.0.2

4 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago