GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Ritesh25696/random-string-alphanumeric-module: A module that can return various types of random string.

BranchesTags
Open more actions menu

Latest commit

 

History

30 Commits
30 Commits

Folders and files

NameName
Last commit message
Last commit date
README.md
README.md
 
 
package.json
package.json
 
 
server.js
server.js
 
 
utils.js
utils.js
 
 

Repository files navigation

random-string-alphanumeric-generator

A module that can return various types of random string
npm version npm npm GitHub Release Date Maintenance

HOW TO INSTALL

npm install random-string-alphanumeric-generator --save

HOW TO USE

var random = require('random-string-alphanumeric-generator');

random.randomAlphanumeric(10, "lowercase") //Returns b2pdk4bv98

random.randomLetters(10, "uppercase") //Returns ABHUISLCHF

METHODS

  • randomAlphanumeric
    Generates a random string of given length
    lettersIncluded optional field which can be one of following
    all (default): Includes uppercase letters lowercase letters and numbers
    lowercase: Includes lowercase letters and numbers
    uppercase: Includes uppercase letters and numbers
 random.randomAlphanumeric(10, lowercase) // uhf2m363l1
 random.randomAlphanumeric(10, uppercase) // DG8CXMZ21F
 random.randomAlphanumeric(10) // 5hiry73uV8
  • randomLetters
    Generates a random string of given length
    lettersIncluded optional field which can be one of following
    all (default): Includes uppercase letters lowercase letters and numbers
    lowercase: Includes lowercase letters and numbers
    uppercase: Includes uppercase letters and numbers
  random.randomAlphanumeric(10, lowercase) // aqswedfrtg
  random.randomAlphanumeric(10, uppercase) // KINHBGFYRS
  random.randomAlphanumeric(10) // 5hiry73uV8 // KqjfrQNkth
  • randomNumber
    Generates a random number of given length
  random.randomNumber(10) // 4369739553
  • randomHex
    Generates a random hex of given length Includes only hex characters i.e [0-9 and a-f]
  random.randomHex(10) // 1dd12084e3
  • randomBinary
    Generates a random binary string of given length Includes only binary characters i.e [0 and 1]
  random.randomBinary(10) // 1110011111
  • randomOctal
    Generates a random octal string of given length Includes only octal characters i.e [0-7]
  random.randomOctal(10) // 2350150766
  • customRandomString
    Generates a random string of given length Includes only characters given in customCharSet
  random.customRandomString(10, abcdef) // eadefcaffb
  • getRandomPassword
    Generates a random string of given length Includes numbers, small letters, capital letters and special characters Second optional param as minimum number of special characters required
  random.getRandomPassword(10)     // JkCtzL*!Pd
  random.getRandomPassword(10, 2)  // $)FN3A#dP^
  • getRandomPasswordStrict
    Generates a random string of given length Includes numbers, small letters, capital letters and special characters second optional param as fixed number of special characters required
  random.getRandomPasswordStrict(10, 3) // #TUjLFgdRg
  • getRndFloat
    Generates random float between min(included) and max(excluded) numbers. Min: Default is 0 Max: Default is 1 Third optional param as number of digits after the decimal point default is 4
  random.getRndFloat(4, 5, 3) // 4.304
  • getRndInteger
    Returns random integer between min(included) and max(excluded) numbers. Min: Default is 0 Max: Default is 100
  random.getRndInteger(5, 50) // 7
  • getRndBoolean
    Generates random boolean true or false.
  random.getRndBoolean() // True or False

About

A module that can return various types of random string.

Topics

generate-passwordrandomrandom-generationrandom-number-generators

Resources

Readme
Activity

Stars

4 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.