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).

flatten(arr, [shallow]):Array

Recursively flattens an array. A new array containing all the elements is returned. If shallow is true, it will only flatten one level.

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.

join(arr, [separator]):String

Joins the strings in arr, inserting separator between each value.

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.

pick(arr):*

Gets a random item and remove it from the array.

pluck(arr, propName):Array

Extract a list of property values.

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().

reject(arr, fn, thisObj):Array

Creates a new array with all the elements that do not pass the truth test. Opposite of filter().

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().

sort(arr, [compareFn]):Array

Returns a sorted Array using the Merge Sort algorithm (stable sort).

split(arr, [segments]):Array

Splits an array into a fixed number of segments.

toLookup(arr, key):Object

Create an object that indexes the items in the array by a key. If key is a function, the key for each value in the resulting object will be the result of calling the function with the value as an argument. Otherwise key specifies the property on each value to use as the key.

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

function

lang

math

number

object

fillIn(obj, ...default):Object

Fill in missing properties in object with values from the defaults objects.

filter(obj, callback, [thisObj])

Returns a new object containing all properties where callback returns true, similar to Array/filter. It does not use properties from the object's prototype.

forOwn(obj, callback[, thisObj])

Iterate over all own properties from an Object, similar to Array/forEach.

get(obj, propName):*

Returns nested property value. Will return undefined if property doesn't exist.

has(obj, propName):Boolean

Checks if object contains a child property. Useful for cases where you need to check if an object contain a nested property. It will get properties inherited by the prototype.

hasOwn(obj, propName):Boolean

Safer Object.hasOwnProperty. Returns a boolean indicating whether the object has the specified property.

keys(obj):Array

Returns an array of all own enumerable properties found upon a given object. It will use the native Object.keys if present.

map(obj, callback, [thisObj]):Object

Returns a new object where the property values are the result of calling the callback for each property in the original object, similar to Array/map.

merge(...objects):Object

Deep merges objects. Note that objects and properties will be cloned during the process to avoid undesired side effects. It return a new object and won't affect source objects.

mixIn(target, ...objects):Object

Combine properties from all the objects into first one.

namespace(obj, propName):Object

Creates an empty object inside namespace if not existent. Will return created object or existing object.

pick(obj, ...keys):Object

Return a copy of the object that contains only the whitelisted keys.

values(obj):Array

Returns an array of all own enumerable properties values found upon a given object.

set(obj, propName, value)

Sets a nested property value.

size(obj):Number

Returns the count of own enumerable properties found upon a given object.

unset(obj, propName):Boolean

Delete object property if existent and returns a boolean indicating succes. It will also return true if property doesn't exist.

queryString

random

string

camelCase(str):String

Convert string to "camelCase" text.

contains(str, substring):Boolean

Checks if string contains the given substring.

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

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

endsWith(str, suffix):Boolean

Checks if string ends with specified suffix.

escapeHtml(str):String

Escapes HTML special chars (>, <, &, ", ').

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):Boolean

Checks if string starts with specified prefix.

slugify(str[, delimeter]):String

Convert to lower case, remove accents, remove non-word chars and replace spaces with the delimeter. The default delimeter is a hyphen.

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.

underscore(str):String

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

unescapeHtml(str):String

Unescapes HTML special chars (>, <, &, ", ').

unhyphenate(str):String

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

upperCase(str):String

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

time