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:

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

Examples

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

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