Random

Standard library generic random functions.

Usage

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

random

Standard library generic random functions.

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: standard library base pseudorandom number generators (PRNGs).
  • iterators: standard library pseudorandom number generator (PRNG) iterators.
  • streams: standard library pseudorandom number generator (PRNG) streams.

Examples

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

console.log( objectKeys( ns ) );