🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More →
Socket
Book a DemoSign in
Socket

random-id-generator

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

random-id-generator

generate ramdon id

latest
npmnpm
Version
0.0.2
Version published
Weekly downloads
20
150%
Maintainers
1
Weekly downloads
 
Created
Source

Random Id Generator

Javascript Random ID Generator.

Generate a random string from character 'a' to 'z', from 0 to 9, and from 'A' to 'Z'.

Usage

npm install random-id-generator
let randomIdGenerator = require('random-id-generator');
let defaultLengthId = randomIdGenerator();
//defaultLengthId 3KDl9x
//default length is 6

let specifiedLengthId = randomIdGenerator(10);
//specifiedLengthId 8HdySjG61x
//10 length

Test

Using mocha to run tests.

  • Install Mocha:
npm install mocha -g
  • Run the tests:
mocha

Keywords

id

FAQs

Package last updated on 13 Dec 2015

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