0.1.1 • Published 3 years ago

@pieterspruijt/pieter v0.1.1

Weekly downloads
2
License
ISC
Repository
github
Last release
3 years ago

@pieterspruijt/pieter

Version Downloads

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

NameTypeDefault Value
prefixString''
suffixString''