Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

unique-id-generator

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unique-id-generator

utility to generate unique ID based on Date.now()

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

unique-id-generator

Utility to generate unique ID based on Date.now()

##Why? This function is meant to return an unique ID using the value of Date.now(), it ensures that the IDs are unique (from all other IDs generated by an instances of this module)

##How to use it? 1.- Install it in your project:

npm install unique-id-generator -S

2.- Require it:

var generateID = require("unique-id-generator");

3.- Use it:

var id = generateID({prefix:"id-"});
//generates something like id-1476734792457

4.- Profit.

##API ###uniqueIdGenerator([options])

###options ####prefix Type: String

Adds specified prefix at the beginning of the generated ID.

####suffix Type: String

Adds specified suffix at the end of the generated ID.

Keywords

FAQs

Package last updated on 17 Oct 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc