Creates a Query that iterates the elements from sources picked from a list based on the result of a lazily evaluated choice.
A callback used to choose a source.
A list of sources
A default source to use when another choice could not be made.
Creates a Query that, when iterated, consumes the provided Iterator
.
An Iterator
object.
An OrderedHierarchyIterable object.
An OrderedHierarchyIterable object.
An OrderedHierarchyIterable object.
An OrderedHierarchyIterable object.
An OrderedHierarchyIterable object.
A HierarchyProvider object.
An OrderedHierarchyIterable object.
A HierarchyProvider object.
Creates a HierarchyQuery from a root node and a HierarchyProvider.
The root node of the hierarchy.
A HierarchyProvider object.
Creates a Query that iterates the elements from one of two sources based on the result of a lazily evaluated condition.
A callback used to choose a source.
The source to use when the callback evaluates to true
.
The source to use when the callback evaluates to false
.
Creates a Query for the own property key-value pairs of an object.
An object.
Computes the average for a series of numbers.
Computes the average for a series of numbers.
Creates a tuple whose first element is a subquery containing the first span of elements that do not match the supplied predicate, and whose second element is a subquery containing the remaining elements.
The first subquery is eagerly evaluated, while the second subquery is lazily evaluated.
The predicate used to match elements.
Writes each element to a destination array.
The destination array.
The offset into the array at which to start writing.
The number of elements to write to the array.
A Queryable object.
An optional callback used to compare the equality of two elements.
A Queryable object.
An optional callback used to compare the equality of two elements.
A Queryable object.
A callback used to select the key for each element.
Computes a scalar value indicating whether the key for every element in this Query corresponds to a matching key
in right
at the same position.
A Queryable object.
A callback used to select the key for each element in this Query.
A callback used to select the key for each element in right
.
An optional callback used to compare the equality of two keys.
Counts the number of elements in the Query, optionally filtering elements using the supplied callback.
An optional callback used to match each element.
Iterates over all of the elements in the Query, ignoring the results.
Finds the value in the Query at the provided offset. A negative offset starts from the last element.
An offset.
A Queryable object.
A callback used to compare the equality of two elements.
A Queryable object.
A callback used to compare the equality of two elements.
Computes a scalar value indicating whether all elements of the Query match the supplied callback.
A callback used to match each element.
Computes a scalar value indicating whether all elements of the Query match the supplied callback.
A callback used to match each element.
Gets the first element in the Query, optionally filtering elements using the supplied callback.
An optional callback used to match each element.
Gets the first element in the Query, optionally filtering elements using the supplied callback.
An optional callback used to match each element.
Invokes a callback for each element of the Query.
The callback to invoke.
Computes a scalar value indicating whether the provided value is included in the Query.
A value.
An optional callback used to compare the equality of two elements.
Computes a scalar value indicating whether the provided value is included in the Query.
A value.
An optional callback used to compare the equality of two elements.
A Queryable object.
A callback used to compare the equality of two elements.
A Queryable object.
A callback used to compare the equality of two elements.
Gets the last element in the Query, optionally filtering elements using the supplied callback.
An optional callback used to match each element.
Gets the last element in the Query, optionally filtering elements using the supplied callback.
An optional callback used to match each element.
Gets the maximum element in the Query, optionally comparing elements using the supplied callback.
An optional callback used to compare two elements.
Gets the maximum element by its key in the Query, optionally comparing the keys of each element using the supplied callback.
A callback used to choose the key to compare.
An optional callback used to compare the keys.
Gets the minimum element in the Query, optionally comparing elements using the supplied callback.
An optional callback used to compare two elements.
Gets the minimum element by its key in the Query, optionally comparing the keys of each element using the supplied callback.
A callback used to choose the key to compare.
An optional callback used to compare the keys.
Finds the value in the Query at the provided offset. A negative offset starts from the last element.
This is an alias for elementAt
.
An offset.
Computes a scalar value by applying an accumulator callback over each element.
the callback used to compute the result.
The current accumulated value.
The value to accumulate.
The offset from the start of the underlying Queryable.
Computes a scalar value by applying an accumulator callback over each element.
the callback used to compute the result.
The current accumulated value.
The value to accumulate.
The offset from the start of the underlying Queryable.
An optional seed value.
An optional callback used to compute the final result.
Computes a scalar value by applying an accumulator callback over each element.
the callback used to compute the result.
The current accumulated value.
The value to accumulate.
The offset from the start of the underlying Queryable.
An optional seed value.
An optional callback used to compute the final result.
Computes a scalar value by applying an accumulator callback over each element in reverse.
the callback used to compute the result.
Computes a scalar value by applying an accumulator callback over each element in reverse.
the callback used to compute the result.
An optional seed value.
An optional callback used to compute the final result.
Computes a scalar value by applying an accumulator callback over each element in reverse.
the callback used to compute the result.
An optional seed value.
An optional callback used to compute the final result.
Gets the only element in the Query, or returns undefined
.
An optional callback used to match each element.
Gets the only element in the Query, or returns undefined.
An optional callback used to match each element.
Computes a scalar value indicating whether the Query contains any elements, optionally filtering the elements using the supplied callback.
An optional callback used to match each element.
Creates a tuple whose first element is a subquery containing the first span of elements that match the supplied predicate, and whose second element is a subquery containing the remaining elements.
The first subquery is eagerly evaluated, while the second subquery is lazily evaluated.
The predicate used to match elements.
Creates a tuple whose first element is a subquery containing the first span of elements that match the supplied predicate, and whose second element is a subquery containing the remaining elements.
The first subquery is eagerly evaluated, while the second subquery is lazily evaluated.
The predicate used to match elements.
A Queryable object.
A callback used to compare the equality of two elements.
A Queryable object.
A callback used to compare the equality of two elements.
Computes the sum for a series of numbers.
Computes the sum for a series of numbers.
Creates a Lookup
for the elements of the Query.
A callback used to select a key for each element.
An [[Equaler]] object used to compare key equality.
Creates a Lookup
for the elements of the Query.
A callback used to select a key for each element.
A callback that selects a value for each element.
An [[Equaler]] object used to compare key equality.
Creates a Map
for the elements of the Query.
A callback used to select a key for each element.
Creates a Map
for the elements of the Query.
A callback used to select a key for each element.
An [[Equaler]] object used to compare key equality.
Creates a Map
for the elements of the Query.
A callback used to select a key for each element.
A callback that selects a value for each element.
Creates a Map
for the elements of the Query.
A callback used to select a key for each element.
A callback that selects a value for each element.
An [[Equaler]] object used to compare key equality.
Creates an Object for the elements of the Query. Properties are added via Object.defineProperty
.
// As a regular object
const obj = from([["x", 1], ["y", 2]]).toObject(undefined, a => a[0]);
obj.x; // ["x", 1]
obj.y; // ["y", 2]
typeof obj.toString; // function
// with a custom prototype
const baseObject = { toString() { return `${this.x}:${this.y}` } };
const obj = from([["x", 1], ["y", 2]]).toObject(baseObject, a => a[0]);
obj.x; // ["x", 1]
obj.y; // ["y", 2]
typeof obj.toString; // function
obj.toString(); // "x",1:"y",2
// with a null prototype
const obj = from([["x", 1], ["y", 2]]).toObject(null, a => a[0]);
obj.x; // ["x", 1]
obj.y; // ["y", 2]
typeof obj.toString; // undefined
The prototype for the object. If prototype
is null
, an object with a null
prototype is created. If prototype
is undefined
, the default Object.prototype
is used.
A callback used to select a key for each element.
Creates an Object for the elements the Query. Properties are added via Object.defineProperty
.
// As a regular object
const obj = from([["x", 1], ["y", 2]]).toObject(undefined, a => a[0], a => a[1]);
obj.x; // 1
obj.y; // 2
typeof obj.toString; // function
// with a custom prototype
const baseObject = { toString() { return `${this.x}:${this.y}` } };
const obj = from([["x", 1], ["y", 2]]).toObject(baseObject, a => a[0], a => a[1]);
obj.x; // 1
obj.y; // 2
typeof obj.toString; // function
obj.toString(); // 1:2
// with a null prototype
const obj = from([["x", 1], ["y", 2]]).toObject(null, a => a[0], a => a[1]);
obj.x; // 1
obj.y; // 2
typeof obj.toString; // undefined
The prototype for the object. If prototype
is null
, an object with a null
prototype is created. If prototype
is undefined
, the default Object.prototype
is used.
A callback used to select a key for each element.
A callback that selects a value for each element.
A callback that defines the PropertyDescriptor
for each property.
Creates a Set
for the elements of the Query.
Creates a Set
for the elements of the Query.
An [[Equaler]] object used to compare equality.
Creates a Set
for the elements of the Query.
A callback that selects a value for each element.
Creates a Set
for the elements of the Query.
A callback that selects a value for each element.
An [[Equaler]] object used to compare equality.
Unzips a sequence of tuples into a tuple of sequences.
Unzips a sequence of tuples into a tuple of sequences.
A callback that converts a result into a tuple.
Creates a subquery for the elements of this Query with the provided value appended to the end.
The value to append.
Creates a subquery that contains the provided default value if this Query contains no elements.
The default value.
Creates a subquery for the distinct elements of this Query.
An [[Equaler]] object used to compare key equality.
Creates a subquery for the distinct elements of this Query.
A callback used to select the key to determine uniqueness.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
Lazily invokes a callback as each element of the Query is iterated.
The callback to invoke.
An element of the source.
The offset from the start of the source iterable.
Creates a subquery for the set difference between this and another Queryable.
A Queryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the set difference between this and another Queryable, where set identity is determined by the selected key.
A Queryable object.
A callback used to select the key for each element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
Creates a subquery with every instance of the specified value removed.
The values to exclude.
Creates a subquery whose elements match the supplied predicate.
A callback used to match each element.
The element to test.
The offset from the start of the source iterable.
Creates a subquery whose elements match the supplied predicate.
A callback used to match each element.
The element to test.
The offset from the start of the source iterable.
Creates a subquery where the selected key for each element matches the supplied predicate.
A callback used to select the key for each element.
The element from which to select a key.
A callback used to match each key.
The key to test.
The offset from the start of the source iterable.
Creates a subquery whose elements are neither null
nor undefined
.
Creates a subquery where the selected key for each element is neither null
nor undefined
.
A callback used to select the key for each element.
The element from which to select a key.
Creates a subquery that iterates the results of applying a callback to each element.
A callback used to map each element into a Queryable.
The element to map.
Creates a subquery that iterates the results of applying a callback to each element.
A callback used to map each element into a Queryable.
The outer element to map.
An optional callback used to map the outer and projected inner elements.
The outer element to map.
An inner element produced by the projection
of the outer element.
Groups each element of this Query by its key.
A callback used to select the key for an element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
Groups each element by its key.
A callback used to select the key for an element.
An element from which to select a key.
A callback used to select a value for an element.
An element from which to select a value.
An [[Equaler]] object used to compare key equality.
Groups each element by its key.
A callback used to select the key for an element.
An element from which to select a key.
A callback used to select a value for an element.
An element from which to select a value.
A callback used to select a result from a group.
The key for the group.
The elements for the group.
An [[Equaler]] object used to compare key equality.
A Queryable object.
An [[Equaler]] object used to compare equality.
A Queryable object.
An [[Equaler]] object used to compare equality.
A Queryable object.
An [[Equaler]] object used to compare equality.
A Queryable object.
A callback used to select the key for each element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
A Queryable object.
A callback used to select the key for each element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
A Queryable object.
A callback used to select the key for each element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
Creates a subquery by applying a callback to each element.
A callback used to map each element.
The element to map.
The offset from the start of the source iterable.
Creates a subquery for the elements of this Query with the provided range patched into the results.
The offset at which to patch the range.
The number of elements to skip from start.
The range to patch into the result.
Creates a subquery for the elements of this Query with the provided value prepended to the beginning.
The value to prepend.
Creates a subquery for the set difference between this and another Queryable.
A Queryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the set difference between this and another Queryable, where set identity is determined by the selected key.
A Queryable object.
A callback used to select the key for each element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
Creates a subquery whose elements are in the reverse order.
Creates a subquery containing the cumulative results of applying the provided callback to each element.
The callback used to compute each result.
The current accumulated value.
The value to accumulate.
The offset from the start of the underlying Queryable.
Creates a subquery containing the cumulative results of applying the provided callback to each element.
The callback used to compute each result.
The current accumulated value.
The value to accumulate.
The offset from the start of the underlying Queryable.
An optional seed value.
Creates a subquery containing the cumulative results of applying the provided callback to each element in reverse.
The callback used to compute each result.
The current accumulated value.
The value to accumulate.
The offset from the start of the underlying Queryable.
Creates a subquery containing the cumulative results of applying the provided callback to each element in reverse.
The callback used to compute each result.
The current accumulated value.
The value to accumulate.
The offset from the start of the underlying Queryable.
An optional seed value.
Creates a subquery by applying a callback to each element.
NOTE: This is an alias for map.
A callback used to map each element.
The element to map.
The offset from the start of the source Queryable.
Creates a subquery that iterates the results of applying a callback to each element.
NOTE: This is an alias for flatMap.
A callback used to map each element into an iterable.
The element to map.
Creates a subquery that iterates the results of applying a callback to each element.
NOTE: This is an alias for flatMap.
A callback used to map each element into an iterable.
The element to map.
An optional callback used to map the outer and projected inner elements.
The outer element to map.
An inner element produced by the projection
of the outer element.
Creates a subquery containing all elements except the first elements up to the supplied count.
The number of elements to skip.
Creates a subquery containing all elements except the last elements up to the supplied count.
The number of elements to skip.
Creates a subquery containing all elements except the first elements that don't match the supplied predicate.
A callback used to match each element.
The element to match.
Creates a subquery containing all elements except the first elements that match the supplied predicate.
A callback used to match each element.
The element to match.
Creates a subquery whose elements are the contiguous ranges of elements that share the same key.
A callback used to select the key for an element.
An element from which to select a key.
Creates a subquery whose values are computed from each element of the contiguous ranges of elements that share the same key.
A callback used to select the key for an element.
An element from which to select a key.
A callback used to select a value for an element.
An element from which to select a value.
Creates a subquery whose values are computed from the contiguous ranges of elements that share the same key.
A callback used to select the key for an element.
An element from which to select a key.
A callback used to select a value for an element.
An element from which to select a value.
A callback used to select a result from a contiguous range.
The key for the span.
The elements for the span.
Creates a subquery for the symmetric difference between this and another Queryable.
A Queryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the symmetric difference between this and another Queryable, where set identity is determined by the selected key.
A Queryable object.
A callback used to select the key for each element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
Creates a subquery containing the first elements up to the supplied count.
The number of elements to take.
Creates a subquery containing the last elements up to the supplied count.
The number of elements to take.
Creates a subquery containing the first elements that do not match the supplied predicate.
A callback used to match each element.
The element to match.
Creates a subquery containing the first elements that match the supplied predicate.
A callback used to match each element.
The element to match.
Creates a subquery containing the first elements that match the supplied predicate.
A callback used to match each element.
The element to match.
The callback to invoke.
An element of the source.
The offset from the start of the source iterable.
A callback function.
The outer Query.
A Queryable object.
An [[Equaler]] object used to compare equality.
A Queryable object.
A callback used to select the key for each element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
Creates a subquery whose elements match the supplied predicate.
NOTE: This is an alias for filter.
A callback used to match each element.
The element to test.
The offset from the start of the source iterable.
Creates a subquery whose elements match the supplied predicate.
NOTE: This is an alias for filter.
A callback used to match each element.
The element to test.
The offset from the start of the source iterable.
Creates a subquery where the selected key for each element matches the supplied predicate.
NOTE: This is an alias for filterBy.
A callback used to select the key for each element.
The element from which to select a key.
A callback used to match each key.
The key to test.
The offset from the start of the source iterable.
Creates a subquery whose elements are neither null
nor undefined
.
NOTE: This is an alias for filterDefined.
Creates a subquery where the selected key for each element is neither null
nor undefined
.
NOTE: This is an alias for filterDefined.
A callback used to select the key for each element.
The element from which to select a key.
Creates a subquery for the symmetric difference between this and another Queryable.
NOTE: This is an alias for symmetricDifference.
A Queryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the symmetric difference between this and another Queryable, where set identity is determined by the selected key.
NOTE: This is an alias for symmetricDifferenceBy.
A Queryable object.
A callback used to select the key for each element.
An element from which to select a key.
An [[Equaler]] object used to compare key equality.
Creates an ordered subquery whose elements are sorted in ascending order by the provided key.
A callback used to select the key for an element.
An optional callback used to compare two keys.
Creates an ordered subquery whose elements are sorted in descending order by the provided key.
A callback used to select the key for an element.
An optional callback used to compare two keys.
Creates a subsequent ordered subquery whose elements are sorted in ascending order by the provided key.
A callback used to select the key for an element.
An optional callback used to compare two keys.
Creates a subsequent ordered subquery whose elements are sorted in descending order by the provided key.
A callback used to select the key for an element.
An optional callback used to compare two keys.
A Queryable object.
A callback used to select the key for an element in this Query.
A callback used to select the key for an element in the other Queryable.
A callback used to select the result for the correlated elements.
An [[Equaler]] object used to compare key equality.
A Queryable object.
A callback used to select the key for an element in this Query.
A callback used to select the key for an element in the other Queryable object.
A callback used to select the result for the correlated elements.
An [[Equaler]] object used to compare key equality.
A Queryable object.
A callback used to select the key for an element in this Query.
A callback used to select the key for an element in the other Queryable.
A callback used to select the result for the correlated elements.
An [[Equaler]] object used to compare key equality.
Creates a subquery for the ancestors of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the ancestors of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the ancestors of each element as well as each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the ancestors of each element as well as each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the bottom-most elements. Elements that are an ancestor of any other element are removed.
Creates a subquery for the bottom-most elements. Elements that are an ancestor of any other element are removed.
Creates a subquery for the children of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the children of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the descendants of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the descendants of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the descendants of each element as well as each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the descendants of each element as well as each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the child of each element at the specified offset. A negative offset starts from the last child.
The offset for the child.
Creates a subquery for the parents of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the parents of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the roots of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the roots of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for this [[query]].
A callback used to filter the results.
Creates a subquery for this [[query]].
A callback used to filter the results.
Creates a subquery for this [[query]].
A callback used to filter the results.
Creates a subquery for the siblings of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the siblings of each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the siblings after each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the siblings after each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the siblings of each element as well as each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the siblings of each element as well as each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the siblings before each element in the hierarchy.
A callback used to filter the results.
Creates a subquery for the siblings before each element in the hierarchy.
A callback used to filter the results.
Creates a HierarchyQuery using the provided HierarchyProvider.
Creates a subquery for the top-most elements. Elements that are a descendant of any other element are removed.
Creates a subquery for the top-most elements. Elements that are a descendant of any other element are removed.
Generated using TypeDoc
Represents an ordered sequence of hierarchically organized values.