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

node-unique-id-generator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-unique-id-generator

Unique Id and GUID creator for node.

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

node-unique-id-generator

A npm module to generate Unique ID and GUID for node.

Table of Contents

Installation

npm install node-unique-id-generator --save

How to use

Generate Unique ID

Unique ID with no prefix or suffix
const uidGenerator = require('node-unique-id-generator');
console.log(uidGenerator.generateUniqueId()); // 149897061806898563200922e1443e123

Unique ID with prefix
const uidGenerator = require('node-unique-id-generator');
console.log(uidGenerator.generateUniqueId('pre-')); // pre-149897061806898563200922e1443e123

Unique ID with prefix and suffix
const uidGenerator = require('node-unique-id-generator');
console.log(uidGenerator.generateUniqueId('pre-','-suf')); // pre-149897061806898563200922e1443e123-suf

Unique ID with suffix
const uidGenerator = require('node-unique-id-generator');
console.log(uidGenerator.generateUniqueId('','-suf')); // 149897061806898563200922e1443e123-suf

Generate GUID

const uidGenerator = require('node-unique-id-generator');
console.log(uidGenerator.generateGUID()); // 5ccf7d01-3553-3e2b-a96e-1200cda69640

Keywords

FAQs

Package last updated on 18 Aug 2017

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