Skip to content

API improvements & documentation

Compare
Choose a tag to compare
@mesmo mesmo released this 15 Jan 09:10
· 15 commits to main since this release

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 renamed Criteria as this more accurately reflects its use in Dimension construction.
  • The map function has been renamed aggregate 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/