array

append(arr1, arr2):Array

Appends an array to the end of the other. The first array will be modified and will contain the appended items.

combine(arr1, arr2):Array

Combines an array with all the items of another. The first array will be modified and will contain the combined items. Does not allow duplicates and is case and type sensitive.

compact(arr):Array

Returns a new Array without any null or undefined values. Note that it will keep empty strings and other falsy values (simillar to Ruby Array#compact).

contains(arr, value):Boolean

Checks if Array contains value. Alias to indexOf(arr, val) !== -1.

difference(...arrs):Array

Return a new Array with elements that aren't present in the other Arrays besides the first one.

every(arr, callback, [thisObj]):Array

Crossbrowser ES5 Array.every().

filter(arr, callback, [thisObj]):Array

Crossbrowser ES5 Array.filter().

find(arr, callback, [thisObj]):void

Loops through all the items in the Array and returns the first one that passes a truth test (callback).

forEach(arr, callback, [thisObj]):void

Crossbrowser ES5 Array.forEach().

indexOf(arr, item, [fromIndex]):Number

Crossbrowser ES5 Array.indexOf().

insert(arr, ...items):Number

Push items into array only if they aren't contained by it. Returns the new length of the array.

intersection(...arrs):Arrays

Return a new Array with elements common to all Arrays.

lastIndexOf(arr, item, [fromIndex]):Number

Crossbrowser ES5 Array.lastIndexOf().

map(arr, callback):Array

Crossbrowser ES5 Array.map().

max(arr[, iterator]):*

Returns maximum value inside array or use a custom iterator to define how items should be compared.

min(arr[, iterator]):*

Returns minimum value inside array or use a custom iterator to define how items should be compared.

range([start], stop[, step]):Array

Creates a new Array with all the values inside the range. Works similarly to Python#range or PHP#range.

reduce(arr, fn):*

Crossbrowser ES5 Array.reduce().

reduceRight(arr, fn):*

Crossbrowser ES5 Array.reduceRight().

remove(arr, item):void

Remove a single item from the array.

removeAll(arr, item):void

Remove all instances of an item from the array.

shuffle(arr):Array

Returns a new Array with items randomly sorted (shuffled). Similar to Ruby Array#shuffle.

some(arr, callback, [thisObj]):Array

Crossbrowser ES5 Array.some().

union(...arrs):Array

Concat multiple arrays removing duplicates.

unique(arr):Array

Return a new Array of unique items.

xor(arr1, arr2):Array

Exclusive OR. Returns items that are present in a single array.

financial

lang

math

number

object

queryString

random

string

camelCase(str):String

Convert string to "camelCase" text.

crop(str, maxChars, [append]):String

Truncate string at full words. Alias to truncate(str, maxChars, append, true);.

endsWith(str, suffix):String

Checks if string ends with specified suffix.

escapeRegExp(str):String

Escape special chars to be used as literals in RegExp constructors.

hyphenate(str):String

Replaces spaces with hyphens, split camelCase text, remove non-word chars, remove accents and convert to lower case.

interpolate(str, replacements[, syntax]):String

String interpolation. Format/replace tokens with object properties.

lowerCase(str):String

"Safer" String.toLowerCase(). (Used internally)

lpad(str, minLength[, char]):String

Pad string from left with char if its' length is smaller than minLen.

ltrim(str):String

Remove white-spaces from beginning of string.

makePath(...args):String

Group arguments as path segments, if any of the args is null or undefined it will be ignored from resulting path. It will also remove duplicate "/".

normalizeLineBreaks(str, [lineBreak]):String

Normalize line breaks to a single format. Defaults to Unix \n.

pascalCase(str):String

Convert string to "PascalCase" text.

properCase(str):String

UPPERCASE first char of each word, lowercase other chars.

removeNonASCII(str):String

Remove non-printable ASCII chars.

removeNonWord(str):String

Remove non-word chars.

repeat(str, n):String

Repeat string n-times.

replaceAccents(str):String

Replaces all accented chars with regular ones.

rpad(str, minLength[, char]):String

Pad string from right with char if its' length is smaller than minLen.

rtrim(str):String

Remove white-spaces from end of string.

sentenceCase(str):String

UPPERCASE first char of each sentence and lowercase other chars.

stripHtmlTags(str):String

Remove HTML/XML tags from string.

startsWith(str, prefix):String

Checks if string starts with specified prefix.

toSlug(str):String

Convert to lower case, remove accents, remove non-word chars and replace spaces with hyphens.

trim(str):String

Remove white-spaces from beginning and end of string.

truncate(str, maxChars, [append], [onlyFullWords]):String

Limit number of chars. Returned string length will be <= maxChars.

typecast(str):*

Parses string and convert it into a native value.

unCamelCase(str):String

Add space between camelCase text and convert first char of each word to lower case.

unHyphenate(str):String

Replaces hyphens with spaces. (only hyphens between word chars)

upperCase(str):String

"Safer" String.toUpperCase(). (Used internally)

time