🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

randomize

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

randomize

Helper for generating random values in your code

0.0.4
latest
npm
Version published
Weekly downloads
671
-15.17%
Maintainers
1
Weekly downloads
 
Created
Source

randomize

Helper for generating random values in your code

Usage

var random = require('randomize');

// Generate random boolean
var randomBoolean = random(); // --> true

// Generate random number between 0 and 100
var randomNumber = random(100); // --> 52

// Return random member of an array
var arr = ['foo', 'bar', 'baz'];
var randomMember = random(arr); // --> 'baz'

// Return random member of arguments object
var randomArg = random('qux', 1, 2); // --> 2

// Return random property of an object
var obj = {foo: 'bar', baz: 'qux', qux: 'foo', bar: 'baz'};
var randomProperty = random(obj); // --> {qux: 'foo'}

FAQs

Package last updated on 06 Apr 2013

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