Version: v0.7.0 - Beta.  We welcome contributors & feedback.

String.random

String.random($numChars) -> string

Description

Create a string of random base-36 characters, consisting of lowercase letters [a-z] and digits [0-9].

This can be used to generate unique IDs.

String.random(40)
//= '5tp9u3swocd5tx7bs06v1fzdv8fwjkzyo4jdl3q7'

See Also