API improvements & documentation
Pivot is available from Skypack and can be found here: https://cdn.skypack.dev/@steelbreeze/pivot
API improvements
The API has seen incremental changes in 4.2 and now 4.3 releases. The following are highlights and breaking changes:
- The
Predicate
type has been renamedCriteria
as this more accurately reflects its use inDimension
construction. - The
map
function has been renamedaggregate
as it does not just map the data, it also flattens the data by one dimension. - The
distinct
function has been removed, as it is not strictly required, it was just provided as a utility and can easily be replicated with the code fragment below:
function distinct<TValue>(value: TValue, index: number, source: Array<TValue>): boolean {
return source.indexOf(value) === index;
}
Documentation
All the function call documentation has now been tidied and has example code fragments. Documentation can be found here: https://steelbreeze.net/pivot/api/v4/