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> uniqueArray(source, length)
-
takes an array of strings or function that returns a string and outputs a unique array of strings based on that source
Parameters:
Name Type Description source
Array.<string> length
number Returns:
- Type
- Array.<string>
Examples
uniqueArray(blaver.random.word, 50)
uniqueArray(blaver.definitions.name.first_name, 6)
uniqueArray(["Hello", "World", "Goodbye"], 2)
-
<static> uniqueArray(source, length)
-
takes an array of strings or function that returns a string and outputs a unique array of strings based on that source
Parameters:
Name Type Description source
Array.<string> length
number Returns:
- Type
- Array.<string>
Examples
uniqueArray(blaver.random.word, 50)
uniqueArray(blaver.definitions.name.first_name, 6)
uniqueArray(["Hello", "World", "Goodbye"], 2)
-
<static> userCard()
-
userCard
-
<static> userCard()
-
userCard