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

raidmaker

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

raidmaker

This module makes a string of charcters randomly and can serve as an id string for databases...

  • 1.3.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

raidmaker

It makes random strings per specified length. It can be used as id in database and apps supported by the environment.

Requirement

  • Node
  • NPM

Installation

Use the package manager npm to install raidmaker.

npm install raidmaker

Usage

const raidmaker = require('raidmaker'); // or
const { generate } = require('raidmaker');

console.log(generate(8, {no: 6}));
// [ 'AXaT6', 'V7xun', 'CPM2c', '2kvbg', 'c93ZQ', 'GdHcv' ]

generate

Generate the strings given the length length length of string returned. default: 5 options no of id element in the returned Array. default: 1, a string is returned mode either of: - apnr || alphanumeric for alphanumeric - figs || figures for figures - alpha || alphabets for alphabets - as || alphaspecial for alphabets with special characters - all for all characters

console.log(raidmaker.generate(5));
// WjMOs

console.log(raidmaker.generate(25, {mode: 'alphaspecial'})); // GvSb&k\WUYHXlrx#zxsVjfppH
console.log(raidmaker.generate(25, {mode: 'apnr'})); // 6IlWaZLnTQEeO8sDyAbSbhquA
console.log(raidmaker.generate(25, {mode: 'alpha'})); // pQjzQFrImUNSYBgMKELgGuosK
console.log(raidmaker.generate(25, {mode: 'all'})); // kQKCIuK&#xRGtwl65IarJ-S\Z
console.log(raidmaker.generate(25, {mode: 'figs'})); // 3140011315334175469386711

Project Status, Whats new?

  • default length
  • support for more than one elements

Support, Suggestion, Bugs...

Visit the Github repository. Thanks

Keywords

FAQs

Package last updated on 14 Apr 2021

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