The list of input objects
the name of the column field to add
the function which, given an object, produces the value for the new column
A new list of objects that contain the newly calcualted column field
Identical to addColumn, but calculates the new column asynchronously.
The list of input objects
the name of the column field to add
the function which, given an object, returns a Promise for the value for the new column
the max number of Promises to issue at once
A Promise for a new list of objects that contain the newly calcualted column field
Aggregates a MultiMap as produced by makeMultiMap using aggFunc over every value list to produce a new transformed Map
The input MultiMap
A function aggregate a list of MultiMap values into a new aggregated type
The aggregated Map from data KeyType to aggFunc output type
Aggregates a MultiMap as produced by makeMultiMap across multiple fields at once
The data
an object of column => aggregation function for a list of values from that column
A Multimap with the same keys and the outputs for each column in aggregations
Deletes a field from a list of objects of RowType, updating the result type appropriately.
The list of input objects
The name of the field to remove
Whether to modify the rows inplace or copy first
A new list of objects without the provided field
Filters out null and undefined values from a list, typing the result so typescript knows the output is NonNullable
Iterates through the provided data and selects the first element that matches each key
a list of objects to process
a function for computed each object's key
a new list with only the first element matching each key
Joins two lists of objects together on an id field extracted via the provided leftId and rightId arguments. This supports inner, left, right, and outer joins via the joinType arg. You must provide a merge function which takes the left and right row as input and returns the newly merged row.
Groups a list of objects into an Map keyed by the provided keyFunc with values being sub-lists of the input data.
The list of objects to transform
The function to use to extract the keys for the output Map
(Optional) a value function to transform the objects for the value list
a Map from key to list of objects
Transforms a list of objects into a Map of key to object. By default this will select the first object in the list for each unique key, unless valueComparer is provided.
The list of objects to transform
Function for extracting the key for the Map
(Optional) a function to transform the Map values
(Optional) a comparer to use to select the best object for each matching key. Should return a value > 0 if the first arg is better to keep over the second.
a Map from key to object, picking the best or first object in the data list for each unique key
Finds the first index of the minimum value in the provide numeric list
Finds the first index of the minimum value in the provide numeric list
Transforms data one at a time from InRowType to OutRowType asynchronously. This implementation uses an ES6 promise pool to issue concurrent promises up to the specified concurrency limit. This is useful when issuing external service calls.
a list of data elements to transform
the (async) transformation function
the max number of promises to issue at one time (default 10)
a list of transformed elements
Transforms data in batches from InRowType to OutRowType asynchronously. The provided transformation function takes in a single batch (list of inputs) and should return a list of transformed outputs. This implementation uses an ES6 promise pool to issue concurrent promises up to the specified concurrency limit. This is useful when issuing external service calls.
a list of data elements to transform
the (async) transformation function
the size of each batch
the max number of promises to issue at one time (default 5)
a list of transformed elements
Generated using TypeDoc
Adds a new top-level field to all objects in the provided data list updating the output type appropriately to contain the newly provided field. Though named addColumn, this can be used for arbitrary object transformation.