Standard library generic random functions.
var random = require( '@stdlib/random' );Standard library generic random functions.
var rand = random;
// returns {...}The namespaces exports the following functions to sample and shuffle elements from an array:
sample( x[, options] ): sample elements from an array-like object.shuffle( arr[, options] ): shuffle elements of an array-like object.
It also contains the following sub-namespaces:
base: standard library base pseudorandom number generators (PRNGs).
var getKeys = require( 'object-keys' ).shim();
var ns = require( '@stdlib/random' );
console.log( getKeys( ns ) );