Home Reference Source

References

all

summary
public

F all(array: Array, predicate: Function): boolean

Passes each element of the array to the given function, and checks if all of the items make the given function return a truthy value, or if all of the items are truthy values.

any

summary
public

F any(array: Array, predicate: Function): boolean

Passes each element of the array to the given function, and checks if any of the items makes the given function return a truthy value, or if any of the items is a truthy value.

append

summary
public

F append(array: Array, args: ...*): Array

Appends the given object(s) on to the end of the given array.

assoc

summary
public

F assoc(array: Array, obj: *): Array | null

Searches through an array whose elements are also arrays comparing obj with the first element of each contained array.

at

summary
public

F at(array: Array, index: number): *

Returns the element at the given index.

bsearch

summary
public

F bsearch(array: Array, callback: Function): *

By using binary search, finds an a value from this array which meets the given condition in O(log n) where n is the length of the array.

bsearchIndex

summary
public

F bsearchIndex(array: Array, callback: Function): number

By using binary search, finds an index of a value from this array which meets the given condition in O(log n) where n is the length of the array.

clear

summary
public

F clear(array: Array): Array

Removes all elements from the array.

collect

summary
public

F collect(array: Array, callback: Function): Array

Invokes the given function once for each element of the array.

compact

summary
public

F compact(array: Array): Array

Returns a copy of the given array, with all the null and undefined items removed.

concat

summary
public

F concat(ary: Array, otherArrays: ...*): Array

Appends the elements of otherArrays into the given array.

count

summary
public

F count(array: Array, predicate: Function): Number

Returns the number of elements.

cycle

summary
public

F cycle(array: Array, callback: Function, count: Number): *

Calls the given callback for each item count times, or forever if count is not given.

delete

summary
public

F rbjsDelete(array: Array, object: *, block: Function): *

Delets all items from the array that are equal to a given object.

deleteAt

summary
public

F deleteAt(array: Array, index: Number): * | null

Deletes the element at the specified index, returning the removed element, or null if the index is out of range.

deleteIf

summary
public

F deleteIf(array: Array, callback: Function): Array

Deletes every item of the array for which the given callback returns true.

difference

summary
public

F difference(array: Array, otherArrays: ...*): Array

Returns a new array that is a copy of the receiver, removing any items that also appear in any of the arrays given as arguments.

dig

summary
public

F dig(array: Array, indices: ...*): Object | null

Retrieves the value object corresponding to each index objects repeatedly.

drop

summary
public

F drop(array: Array, count: number): Array

Drops first n elements from array and returns the rest of the elements in an array.

dropWhile

summary
public

F dropWhile(array: Array, predicate: Function): Array

Drops elements up to, but not including, the first element for which the predicate returns null or false and returns an array containing the remaining elements.

each

summary
public

F each(array: Array, callback: Function): Array

Calls the given callback once for each item in the array, passing that item to the callback.

eachIndex

summary
public

F eachIndex(array: Array, callback: Function): Array

Iterates the items of the array and passes their index to the callback.