Strings.random()

Generate a pseudo-random string which is probabalistically-unique.

Internally, this method uses either the native Buffer from Node.js or the algorithm from the [hat](https://github.com/substack/node-hat) package by [@substack](https://github.com/substack). If you are interested in learning more about psuedo-random number/string generators, you might be interested in reading the Wikipedia list of [random number generator algorithms](http://en.wikipedia.org/wiki/List_of_random_number_generators). Note that, while it is tempting to consider providing a per-process (pseudo-)guarantee of uniqueness by using a process-global "rack" to store past tokens, this module has opted against it in the latest release. This feature was removed to avoid complications around use cases with memory overflow.

Usage

Hover over inputs/exits for more info.

var Strings = require('machinepack-strings');


// Generate a pseudo-random string which is probabalistically-unique.

Strings.random({

style: ,

}).execSync();

Inputs

style

The style of random string to generate.

Exits

error

An unexpected error occurred.

success

OK.

'1a17d9af25aef464b46481d901ba2005'