Global

Members

equalityComparerObject

Defines methods to support the comparison of objects for equality.
Properties:
Name Type Argument Default Description
equals equals <optional>
(===) A function that tests if two elements are equal.
getHash getHash <optional>
getHash() || toString() A function that computes an element's hash code.
A collection of objects that share a common key.
Properties:
Name Type Description
key * The key that the elements have in common.

tryResultObject

A result that defines whether an operation was a success and, if yes, holds the result of that operation.
Properties:
Name Type Description
success Boolean Indicates whether an operation was a success.
value * When successful, holds the result value of an operation. Otherwise undefined.

Type Definitions

accumulator(aggregate, element){*}

An accumulator function.
Name Type Description
aggregate * The current aggregate.
element * An item that should be aggregated to the aggregate.
Returns:
Type Description
* - Returns the new aggregate.

collectionSelector(element, index){Array|String|arrgh.Enumerable}

A function that projects an element into a collection.
Name Type Description
element * The element to project into a collection.
index Number optional The index of the current element.
Returns:
Type Description
Array | String | arrgh.Enumerable - A collection obtained from the current element.

compare(x, y){Number}

A function that tests if an object is smaller than, greater than or equal to another object.
Name Type Description
x * The element to compare to another element.
y * The element to compare to.
Returns:
Type Description
Number - Returns a negative value if the first object is smaller, a positive value if the first object is greater and 0 if both objects are equal.

equals(x, y){Boolean}

A function that tests if two elements are equal.
Name Type Description
x * The element to test for equality.
y * The element to test on.
Returns:
Type Description
Boolean - Return whether the elements are equal.

forEachCallback(element, index){bool}

A function that is applied to each element in an enumerable.
Name Type Description
element * The current element in the for loop.
index Number The index of the current element.
Returns:
Type Description
bool - Return false (or falsey, but not null or undefined) to jump out of the loop early.

getHash(obj){String}

Returns a hash code for the specified object.
Name Type Description
obj * The object for which a hash code is to be returned.
Returns:
Type Description
String - A hash code for the specified object.

groupByResultSelector(key, group){*}

A function that creates a result value from a group of elements.
Name Type Description
key * The key that groups the elements.
group grouping The elements in the group.
Returns:
Type Description
* - Returns a result value from a group of elements.

groupJoinResultSelector(element, group){*}

A function that creates a result value from a group of elements.
Name Type Description
element * The element that is joined.
group grouping The elements that are joined with the element.
Returns:
Type Description
* - Returns a result value from a group of elements.

indexPredicate(element, index){Boolean}

A function to test each element for a condition.
Name Type Description
element * The element to test for a condition.
index Number optional The index of the current element.
Returns:
Type Description
Boolean - Returns whether the current element satisfies the condition.

indexSelector(element, index){*}

A function that projects an element into a new form.
Name Type Description
element * The element to project into a new form.
index Number optional The index of the current element.
Returns:
Type Description
* - A projection of the current element.

joinResultSelector(outer, inner){*}

A function that creates a result value from two elements.
Name Type Description
outer * The element that is joined.
inner * The element that is joined with the outer element.
Returns:
Type Description
* - Returns a result value from two matched elements.

keySelector(element){*}

A function that returns the key value from an element.
Name Type Description
element * The element from which to select a key.
Returns:
Type Description
* - The value of the key for the current element.

predicate(element){Boolean}

A function to test each element for a condition.
Name Type Description
element * The element to test for a condition.
Returns:
Type Description
Boolean - Returns whether the current element satisfies the condition.

selectManyResultSelector(element, intermediate){*}

A function that creates a result value from each element in the intermediate collection.
Name Type Description
element * The element whose collection is processed.
intermediate * The current element of the intermediate collection.
Returns:
Type Description
* - Returns a result value from an intermediate element.

selector(element){*}

A function that projects an element into a new form.
Name Type Description
element * The element to project into a new form.
Returns:
Type Description
* - A projection of the current element.

zipResultSelector(sourceElement, otherElement){*}

A function that creates a result value from two elements.
Name Type Description
sourceElement * An element from the source collection.
otherElement * An element from the other collection.
Returns:
Type Description
* - Returns a result value from two elements.