Skip to content

markodenic/uniqid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

@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 ''

About

A super simple unique id based on timestamp.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published