New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

js-randstr

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

js-randstr

Simple random string generator

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

#js-randstr Simple library to generate random strings

##Installation using npm

npm install js-randstr

using bower

bower install js-randstr

##Usage For nodejs

var randstr = require('js-randstr');

// Generate random string of length 6
randstr(6);

// Generate random string with specified charset
randstr(8, 'abcd');

For browser

<script src="bower_components/js-randstr/lib/randstr.js"></script>
<script>
// Generate random string of length 6
randstr(6);

// Generate random string with specified charset
randstr(8, 'abcd');
</script>

##Tests

# install dev dependencies
npm install

# run tests
npm test

FAQs

Package last updated on 11 Mar 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