random

faker. random

Source:

Methods

(static) alpha(options)

alpha. returns lower/upper alpha characters based count and upcase options

Source:
Parameters:
Name Type Description
options mixed

// defaults to { count: 1, upcase: false }

(static) alpha(options)

alpha. returns lower/upper alpha characters based count and upcase options

Source:
Parameters:
Name Type Description
options mixed

// defaults to { count: 1, upcase: false }

(static) alphaNumeric(count)

alphaNumeric

Source:
Parameters:
Name Type Description
count number

defaults to 1

(static) alphaNumeric(count)

alphaNumeric

Source:
Parameters:
Name Type Description
count number

defaults to 1

(static) arrayElement(array)

takes an array and returns a random element of the array

Source:
Parameters:
Name Type Description
array array

(static) arrayElement(array)

takes an array and returns a random element of the array

Source:
Parameters:
Name Type Description
array array

(static) arrayElements(array, count)

takes an array and returns a subset with random elements of the array

Source:
Parameters:
Name Type Description
array array
count number

number of elements to pick

(static) arrayElements(array, count)

takes an array and returns a subset with random elements of the array

Source:
Parameters:
Name Type Description
array array
count number

number of elements to pick

(static) boolean()

boolean

Source:

(static) boolean()

boolean

Source:

(static) float(options)

returns a single random floating-point number based on a max number or range

Source:
Parameters:
Name Type Description
options mixed

(static) float(options)

returns a single random floating-point number based on a max number or range

Source:
Parameters:
Name Type Description
options mixed

(static) hexaDecimal(count)

hexaDecimal

Source:
Parameters:
Name Type Description
count number

defaults to 1

(static) hexaDecimal(count)

hexaDecimal

Source:
Parameters:
Name Type Description
count number

defaults to 1

(static) image()

locale

Source:

(static) image()

locale

Source:

(static) locale()

locale

Source:

(static) locale()

locale

Source:

(static) number(options)

returns a single random number based on a max number or range

Source:
Parameters:
Name Type Description
options mixed

{min, max, precision}

(static) number(options)

returns a single random number based on a max number or range

Source:
Parameters:
Name Type Description
options mixed

{min, max, precision}

(static) objectElement(object, field)

takes an object and returns the randomly key or value

Source:
Parameters:
Name Type Description
object object
field mixed

(static) objectElement(object, field)

takes an object and returns the randomly key or value

Source:
Parameters:
Name Type Description
object object
field mixed

(static) uuid()

uuid

Source:

(static) uuid()

uuid

Source:

(static) word(type)

word

Source:
Parameters:
Name Type Description
type string

(static) word(type)

word

Source:
Parameters:
Name Type Description
type string

(static) words(count)

randomWords

Source:
Parameters:
Name Type Description
count number

defaults to a random value between 1 and 3

(static) words(count)

randomWords

Source:
Parameters:
Name Type Description
count number

defaults to a random value between 1 and 3

faker. random

Source:

Methods

(static) alpha(options)

alpha. returns lower/upper alpha characters based count and upcase options

Source:
Parameters:
Name Type Description
options mixed

// defaults to { count: 1, upcase: false }

(static) alpha(options)

alpha. returns lower/upper alpha characters based count and upcase options

Source:
Parameters:
Name Type Description
options mixed

// defaults to { count: 1, upcase: false }

(static) alphaNumeric(count)

alphaNumeric

Source:
Parameters:
Name Type Description
count number

defaults to 1

(static) alphaNumeric(count)

alphaNumeric

Source:
Parameters:
Name Type Description
count number

defaults to 1

(static) arrayElement(array)

takes an array and returns a random element of the array

Source:
Parameters:
Name Type Description
array array

(static) arrayElement(array)

takes an array and returns a random element of the array

Source:
Parameters:
Name Type Description
array array

(static) arrayElements(array, count)

takes an array and returns a subset with random elements of the array

Source:
Parameters:
Name Type Description
array array
count number

number of elements to pick

(static) arrayElements(array, count)

takes an array and returns a subset with random elements of the array

Source:
Parameters:
Name Type Description
array array
count number

number of elements to pick

(static) boolean()

boolean

Source:

(static) boolean()

boolean

Source:

(static) float(options)

returns a single random floating-point number based on a max number or range

Source:
Parameters:
Name Type Description
options mixed

(static) float(options)

returns a single random floating-point number based on a max number or range

Source:
Parameters:
Name Type Description
options mixed

(static) hexaDecimal(count)

hexaDecimal

Source:
Parameters:
Name Type Description
count number

defaults to 1

(static) hexaDecimal(count)

hexaDecimal

Source:
Parameters:
Name Type Description
count number

defaults to 1

(static) image()

locale

Source:

(static) image()

locale

Source:

(static) locale()

locale

Source:

(static) locale()

locale

Source:

(static) number(options)

returns a single random number based on a max number or range

Source:
Parameters:
Name Type Description
options mixed

{min, max, precision}

(static) number(options)

returns a single random number based on a max number or range

Source:
Parameters:
Name Type Description
options mixed

{min, max, precision}

(static) objectElement(object, field)

takes an object and returns the randomly key or value

Source:
Parameters:
Name Type Description
object object
field mixed

(static) objectElement(object, field)

takes an object and returns the randomly key or value

Source:
Parameters:
Name Type Description
object object
field mixed

(static) uuid()

uuid

Source:

(static) uuid()

uuid

Source:

(static) word(type)

word

Source:
Parameters:
Name Type Description
type string

(static) word(type)

word

Source:
Parameters:
Name Type Description
type string

(static) words(count)

randomWords

Source:
Parameters:
Name Type Description
count number

defaults to a random value between 1 and 3

(static) words(count)

randomWords

Source:
Parameters:
Name Type Description
count number

defaults to a random value between 1 and 3