Namespace: helpers

faker. helpers

Methods


<static> contextualCard()

contextualCard


<static> contextualCard()

contextualCard


<static> createCard()

createCard


<static> createCard()

createCard


<static> createTransaction()

createTransaction


<static> createTransaction()

createTransaction


<static> mustache(str, data)

mustache

Parameters:
Name Type Description
str string
data object

<static> mustache(str, data)

mustache

Parameters:
Name Type Description
str string
data object

<static> randomize(array)

backward-compatibility

Parameters:
Name Type Description
array array

<static> randomize(array)

backward-compatibility

Parameters:
Name Type Description
array array

<static> regexpStyleStringParse(string)

parse string patterns in a similar way to RegExp

e.g. "#{3}test[1-5]" -> "###test4"

Parameters:
Name Type Description
string string

<static> regexpStyleStringParse(string)

parse string patterns in a similar way to RegExp

e.g. "#{3}test[1-5]" -> "###test4"

Parameters:
Name Type Description
string string

<static> repeatString(string, num)

string repeat helper, alternative to String.prototype.repeat.... See PR #382

Parameters:
Name Type Description
string string
num number

<static> repeatString(string, num)

string repeat helper, alternative to String.prototype.repeat.... See PR #382

Parameters:
Name Type Description
string string
num number

<static> replaceCreditCardSymbols(string, symbol)

replace symbols in a credit card schems including Luhn checksum

Parameters:
Name Type Description
string string
symbol string

<static> replaceCreditCardSymbols(string, symbol)

replace symbols in a credit card schems including Luhn checksum

Parameters:
Name Type Description
string string
symbol string

<static> replaceSymbols(string)

parses string for symbols (numbers or letters) and replaces them appropriately (# will be replaced with number, ? with letter and * will be replaced with number or letter)

Parameters:
Name Type Description
string string

<static> replaceSymbols(string)

parses string for symbols (numbers or letters) and replaces them appropriately (# will be replaced with number, ? with letter and * will be replaced with number or letter)

Parameters:
Name Type Description
string string

<static> replaceSymbolWithNumber(string, symbol)

parses string for a symbol and replace it with a random number from 1-10

Parameters:
Name Type Description
string string
symbol string

defaults to "#"


<static> replaceSymbolWithNumber(string, symbol)

parses string for a symbol and replace it with a random number from 1-10

Parameters:
Name Type Description
string string
symbol string

defaults to "#"


<static> shuffle(o)

takes an array and randomizes it in place then returns it

uses the modern version of the Fisher–Yates algorithm

Parameters:
Name Type Description
o array

<static> shuffle(o)

takes an array and randomizes it in place then returns it

uses the modern version of the Fisher–Yates algorithm

Parameters:
Name Type Description
o array

<static> slugify(string)

slugifies string

Parameters:
Name Type Description
string string

<static> slugify(string)

slugifies string

Parameters:
Name Type Description
string string

<static> userCard()

userCard


<static> userCard()

userCard

Namespace: helpers

faker. helpers

Methods


<static> contextualCard()

contextualCard


<static> contextualCard()

contextualCard


<static> createCard()

createCard


<static> createCard()

createCard


<static> createTransaction()

createTransaction


<static> createTransaction()

createTransaction


<static> mustache(str, data)

mustache

Parameters:
Name Type Description
str string
data object

<static> mustache(str, data)

mustache

Parameters:
Name Type Description
str string
data object

<static> randomize(array)

backward-compatibility

Parameters:
Name Type Description
array array

<static> randomize(array)

backward-compatibility

Parameters:
Name Type Description
array array

<static> regexpStyleStringParse(string)

parse string patterns in a similar way to RegExp

e.g. "#{3}test[1-5]" -> "###test4"

Parameters:
Name Type Description
string string

<static> regexpStyleStringParse(string)

parse string patterns in a similar way to RegExp

e.g. "#{3}test[1-5]" -> "###test4"

Parameters:
Name Type Description
string string

<static> repeatString(string, num)

string repeat helper, alternative to String.prototype.repeat.... See PR #382

Parameters:
Name Type Description
string string
num number

<static> repeatString(string, num)

string repeat helper, alternative to String.prototype.repeat.... See PR #382

Parameters:
Name Type Description
string string
num number

<static> replaceCreditCardSymbols(string, symbol)

replace symbols in a credit card schems including Luhn checksum

Parameters:
Name Type Description
string string
symbol string

<static> replaceCreditCardSymbols(string, symbol)

replace symbols in a credit card schems including Luhn checksum

Parameters:
Name Type Description
string string
symbol string

<static> replaceSymbols(string)

parses string for symbols (numbers or letters) and replaces them appropriately (# will be replaced with number, ? with letter and * will be replaced with number or letter)

Parameters:
Name Type Description
string string

<static> replaceSymbols(string)

parses string for symbols (numbers or letters) and replaces them appropriately (# will be replaced with number, ? with letter and * will be replaced with number or letter)

Parameters:
Name Type Description
string string

<static> replaceSymbolWithNumber(string, symbol)

parses string for a symbol and replace it with a random number from 1-10

Parameters:
Name Type Description
string string
symbol string

defaults to "#"


<static> replaceSymbolWithNumber(string, symbol)

parses string for a symbol and replace it with a random number from 1-10

Parameters:
Name Type Description
string string
symbol string

defaults to "#"


<static> shuffle(o)

takes an array and randomizes it in place then returns it

uses the modern version of the Fisher–Yates algorithm

Parameters:
Name Type Description
o array

<static> shuffle(o)

takes an array and randomizes it in place then returns it

uses the modern version of the Fisher–Yates algorithm

Parameters:
Name Type Description
o array

<static> slugify(string)

slugifies string

Parameters:
Name Type Description
string string

<static> slugify(string)

slugifies string

Parameters:
Name Type Description
string string

<static> userCard()

userCard


<static> userCard()

userCard