Random

Random numbers.

Usage

var random = require( '@stdlib/random' );

random

Namespace containing random number functionality.

var rand = random;
// returns {...}

The namespace exports the following functions to sample and shuffle elements from an array:

It also contains the following sub-namespaces:

  • base: base (i.e., lower-level) pseudorandom number generators (PRNGs).
  • iterators: pseudorandom number generator (PRNG) iterators.
  • streams: pseudorandom number generator (PRNG) streams.

Examples

var objectKeys = require( '@stdlib/utils/keys' );
var ns = require( '@stdlib/random' );

console.log( objectKeys( ns ) );
Did you find this page helpful?