Creates an AsyncQuery 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 an AsyncQuery that, when iterated, consumes the provided AsyncIterator
.
An AsyncIterator
object.
Creates an AsyncQuery that repeats the provided value forever.
The value for each element of the Query
.
Creates an AsyncQuery with no elements.
Creates an AsyncQuery from an AsyncQueryable source.
An AsyncQueryable object.
Creates an AsyncQuery from an AsyncQueryable source.
An AsyncQueryable object.
Creates an AsyncQuery from an AsyncQueryable source.
An AsyncQueryable object.
Creates an AsyncQuery from an AsyncQueryable source.
An AsyncQueryable object.
Creates an AsyncHierarchyQuery
from an AsyncQueryable source.
An AsyncQueryable object.
A HierarchyProvider
object.
Creates an AsyncHierarchyQuery
from an AsyncQueryable source.
An AsyncQueryable object.
A HierarchyProvider
object.
Creates an AsyncQuery whose values are provided by a callback executed a provided number of times.
The number of times to execute the callback.
The callback to execute.
Creates an AsyncHierarchyQuery
from a root node and a HierarchyProvider
.
The root node of the hierarchy.
A HierarchyProvider
object.
Creates an AsyncQuery 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 an AsyncQuery for the own property key-value pairs of an object.
An object.
Creates an AsyncQuery for the own property keys of an object.
An object.
Creates an AsyncQuery for the own property values of an object.
An object.
Creates an AsyncQuery for the provided elements.
The elements of the Query
.
Creates an AsyncQuery over a single element.
The only element for the Query
.
Creates an AsyncQuery for a value repeated a provided number of times.
The value for each element of the Query
.
The number of times to repeat the value.
Computes the average for a series of numbers.
NOTE: If any element is not a number
, this overload will throw.
Computes the average for a series of numbers.
NOTE: If any element is not a number
, this overload will throw.
A callback used to convert a value in source
to a number.
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.
Computes a scalar value indicating whether every element in this AsyncQuery corresponds to a matching element in another AsyncQueryable at the same position.
An AsyncQueryable object.
Computes a scalar value indicating whether every element in this AsyncQuery corresponds to a matching element in another AsyncQueryable at the same position.
An AsyncQueryable object.
An optional callback used to compare the equality of two elements.
Computes a scalar value indicating whether every element in this AsyncQuery corresponds to a matching element in another Queryable at the same position.
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 AsyncQuery 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.
Computes a scalar value indicating whether the elements of this AsyncQuery end with the same sequence of elements in another AsyncQueryable.
An AsyncQueryable object.
A callback used to compare the equality of two elements.
Computes a scalar value indicating whether the elements of this AsyncQuery end with the same sequence of elements in another AsyncQueryable.
An AsyncQueryable 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.
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.
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.
Computes a scalar value indicating whether the elements of this AsyncQuery include an exact sequence of elements from another AsyncQueryable.
An AsyncQueryable object.
A callback used to compare the equality of two elements.
Computes a scalar value indicating whether the elements of this AsyncQuery include an exact sequence of elements from another AsyncQueryable.
An AsyncQueryable 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 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 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.
Computes a scalar value by applying an accumulator callback over each element.
the callback used to compute the result.
An optional seed value.
Computes a scalar value by applying an accumulator callback over each element.
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.
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.
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.
Computes a scalar value indicating whether the elements of this AsyncQuery start with the same sequence of elements in another AsyncQueryable.
An AsyncQueryable object.
A callback used to compare the equality of two elements.
Computes a scalar value indicating whether the elements of this AsyncQuery start with the same sequence of elements in another AsyncQueryable.
An AsyncQueryable object.
A callback used to compare the equality of two elements.
Computes the sum for a series of numbers.
NOTE: If any element is not a number
, this overload will throw.
Computes the sum for a series of numbers.
NOTE: If any element is not a number
, this overload will throw.
A callback used to convert a value in source
to a number.
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 AsyncQuery
.
A callback used to select a key for each element.
Creates a Map
for the elements of the AsyncQuery
.
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 AsyncQuery
.
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 AsyncQuery
.
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 AsyncQuery. Properties are added via Object.defineProperty
.
// As a regular object
const obj = await fromAsync([Promise.resolve(["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 = await fromAsync([Promise.resolve(["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 = await fromAsync([Promise.resolve(["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 = await fromAsync([Promise.resolve(["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 = await fromAsync([Promise.resolve(["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 = await fromAsync([Promise.resolve(["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 AsyncQuery
.
Creates a Set
for the elements of the AsyncQuery
.
An [[Equaler]] object used to compare equality.
Creates a Set
for the elements of the AsyncQuery
.
A callback that selects a value for each element.
Creates a Set
for the elements of the AsyncQuery
.
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 AsyncQuery with the provided value appended to the end.
The value to append.
Creates a subquery that concatenates this AsyncQuery with another AsyncQueryable.
An AsyncQueryable object.
Creates a subquery that contains the provided default value if this AsyncQuery contains no elements.
The default value.
Creates a subquery for the distinct elements of this AsyncQuery.
An [[Equaler]] object used to compare key equality.
Creates a subquery for the distinct elements of this AsyncQuery.
A callback used to select the key to determine uniqueness.
An [[Equaler]] object used to compare key equality.
Lazily invokes a callback as each element of the query is iterated.
The callback to invoke.
Lazily invokes a callback as each element of the query is iterated.
The callback to invoke.
Lazily invokes a callback as each element of the query is iterated.
The callback to invoke.
Creates a subquery for the set difference (a.k.a. 'relative complement') between this AsyncQuery and another AsyncQueryable.
An AsyncQueryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the set difference between this and another AsyncQueryable, where set identity is determined by the selected key.
An AsyncQueryable object.
A callback used to select the key for each element.
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 that iterates the results of recursively expanding the elements of the source.
A callback used to recusively expand each element.
Creates a subquery whose elements match the supplied predicate.
A callback used to match each element.
Creates a subquery whose elements match the supplied predicate.
A callback used to match each element.
Creates a subquery where the selected key for each element matches the supplied predicate.
A callback used to select the key for each element.
A callback used to match each key.
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.
Creates a subquery that iterates the results of applying a callback to each element.
A callback used to map each element into an iterable.
Creates a subquery that iterates the results of applying a callback to each element.
A callback used to map each element into an iterable.
Groups each element of this AsyncQuery by its key.
A callback used to select the key for an element.
An [[Equaler]] object used to compare key equality.
Groups each element by its key.
A callback used to select the key for an element.
A callback used to select a value for an element.
An [[Equaler]] object used to compare key equality.
Groups each element by its key.
A callback used to select the key for an element.
A callback used to select a value for an element.
A callback used to select a result from a group.
An [[Equaler]] object used to compare key equality.
Creates a subquery for the set intersection of this AsyncQuery and another AsyncQueryable.
An AsyncQueryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the set intersection of this AsyncQuery and another AsyncQueryable.
An AsyncQueryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the set intersection of this AsyncQuery and another AsyncQueryable.
An AsyncQueryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the set intersection of this AsyncQuery and another AsyncQueryable, where set identity is determined by the selected key.
An AsyncQueryable object.
A callback used to select the key for each element.
An [[Equaler]] object used to compare key equality.
Creates a subquery for the set intersection of this AsyncQuery and another AsyncQueryable, where set identity is determined by the selected key.
An AsyncQueryable object.
A callback used to select the key for each element.
An [[Equaler]] object used to compare key equality.
Creates a subquery for the set intersection of this AsyncQuery and another AsyncQueryable, where set identity is determined by the selected key.
An AsyncQueryable object.
A callback used to select the key for each element.
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.
Creates a subquery that splits this AsyncQuery into one or more pages. While advancing from page to page is evaluated lazily, the elements of the page are evaluated eagerly.
The number of elements per page.
Creates a subquery for the elements of this AsyncQuery 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 AsyncQuery with the provided value prepended to the beginning.
The value to prepend.
Creates a subquery for the set difference between this AsyncQuery and another AsyncQueryable.
This is an alias for except
.
An AsyncQueryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the set difference between this AsyncQuery and another AsyncQueryable.
This is an alias for except
.
An AsyncQueryable object.
A callback used to select the key for each element.
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.
Creates a subquery containing the cumulative results of applying the provided callback to each element.
The callback used to compute each result.
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.
Creates a subquery containing the cumulative results of applying the provided callback to each element in reverse.
The callback used to compute each result.
An optional seed value.
Creates a subquery by applying a callback to each element.
This is an alias for map
.
A callback used to map each element.
Creates a subquery that iterates the results of applying a callback to each element.
This is an alias for flatMap
.
A callback used to map each element into an iterable.
Creates a subquery that iterates the results of applying a callback to each element.
This is an alias for flatMap
.
A callback used to map each element into an iterable.
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 do not match the supplied predicate.
A callback used to match each element.
Creates a subquery containing all elements except the first elements that match the supplied predicate.
A callback used to match each element.
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.
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.
A callback used to select a value for an element.
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.
A callback used to select a value for an element.
A callback used to select a result from a contiguous range.
Creates a subquery for the symmetric difference between this AsyncQuery and another AsyncQueryable.
An AsyncQueryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the symmetric difference between this AsyncQuery and another AsyncQueryable.
An AsyncQueryable object.
A callback used to select the key for each element.
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.
Creates a subquery containing the first elements that match the supplied predicate.
A callback used to match each element.
Creates a subquery containing the first elements that match the supplied predicate.
A callback used to match each element.
Lazily invokes a callback as each element of the query is iterated.
This is an alias for do
.
The callback to invoke.
Lazily invokes a callback as each element of the query is iterated.
This is an alias for do
.
The callback to invoke.
Lazily invokes a callback as each element of the query is iterated.
This is an alias for do
.
The callback to invoke.
Pass the entire query to the provided callback, creating a new query from the result.
A callback function.
Creates a subquery for the set union of this AsyncQuery and another AsyncQueryable.
An AsyncQueryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the set union of this AsyncQuery and another AsyncQueryable, where set identity is determined by the selected key.
An AsyncQueryable object.
A callback used to select the key for each element.
An [[Equaler]] object used to compare key equality.
Creates a subquery whose elements match the supplied predicate.
This is an alias for filter
.
A callback used to match each element.
Creates a subquery whose elements match the supplied predicate.
This is an alias for filter
.
A callback used to match each element.
Creates a subquery where the selected key for each element matches the supplied predicate.
A callback used to select the key for each element.
A callback used to match each key.
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.
Creates a subquery for the symmetric difference between this AsyncQuery and another AsyncQueryable.
This is an alias for symmetricDifference
.
An AsyncQueryable object.
An [[Equaler]] object used to compare equality.
Creates a subquery for the symmetric difference between this AsyncQuery and another AsyncQueryable.
This is an alias for symmetricDifference
.
An AsyncQueryable object.
A callback used to select the key for each element.
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.
Creates a subquery for the correlated elements of this AsyncQuery and another AsyncQueryable.
A Queryable object.
A callback used to select the key for an element in this AsyncQuery.
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 grouped subquery for the correlated elements of this AsyncQuery and another AsyncQueryable object.
A Queryable object.
A callback used to select the key for an element in this AsyncQuery.
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.
Creates a subquery for the correlated elements of this AsyncQuery and another AsyncQueryable.
A Queryable object.
A callback used to select the key for an element in this AsyncQuery.
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 that combines this AsyncQuery with another AsyncQueryable by combining elements in tuples.
An AsyncQueryable object.
Creates a subquery that combines this AsyncQuery with another AsyncQueryable by combining elements using the supplied callback.
An AsyncQueryable object.
A callback used to combine two elements.
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 [[Asyncquery]].
A callback used to filter the results.
Creates a subquery for this [[Asyncquery]].
A callback used to filter the results.
Creates a subquery for this [[Asyncquery]].
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.
A 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.