just.randomstring
generate random string for api keys, passwords ...
Last updated 7 years ago by kopipejst .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install just.randomstring 
SYNC missed versions from official npm registry.

#just.randomstring#

Build Status

JavaScript random string generator.

Can be used for generating random string for api keys, passwords ...

##Installation##

###Node.js###

npm package

npm install just.randomstring

use in node.js

var randomstring = require('just.randomstring');

###Browser###

  • download just.randomstring.js from GitHub
  • include on your page: <script src="just.randomstring.js"></script>

##Usage##

randomstring can be used in node.js or on client side in browser

###node.js

var randomstring = randomstring();

###browser

var randomstring = just.randomstring();

##Options##

###len length of random string (default 20)

examples:

var rs = randomstring(); // returns "ElZOtlOSLn49GeKLev2O"
var rs = randomstring(5); // returns "Erf7g"

###type type of characters that will be used for string generating (default numbers_uppercases_lowercases)

type can be numbers, uppercases, lowercases or combination of those separated with _

examples:

var rs = randomstring(20, 'numbers'); // returns "78394850802905961074"
var rs = randomstring(15, 'numbers_uppercases'); // returns "PXL3AE2USI7ZDQ2"

##Demo## workshop.rs

Current Tags

  • 0.1.1                                ...           latest (7 years ago)

3 Versions

  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 6
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (2)

Copyright 2014 - 2017 © taobao.org |