@pieterspruijt/pieter
v0.1.1
Published
the Pieter package
Downloads
4
Maintainers
Readme
@pieterspruijt/pieter
A super simple, lightning fast unique id based on the current timestamp in milliseconds, with optional prefix and suffix.
Install
$ npm install @pieterspruijt/pieter
Usage
var uniqid = require("@pieterspruijt/pieter");
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 | '' |