group-sort-util

1.0.8 • Public • Published

Temporal group and sort wrapper

install with

npm install

test with

npm test

The module will:

  • group a collection by the group property specified
  • split each main group by the temporal attribute specified
  • sort each element inside the related group according to the sorting attributes specified

Example of usage:

let groupAndTemporalSortCollection = groupAndTemporalSort(
    {collection:testData,unit:temporalUnit.MINUTE,temporalOrder:sortOrder.descending,
    temporalPropertyName:"date",groupPropertyName:"group-1",groupOrder:sortOrder.ascending}
);  

Package Sidebar

Install

npm i group-sort-util

Weekly Downloads

6

Version

1.0.8

License

ISC

Unpacked Size

10.7 kB

Total Files

5

Last publish

Collaborators

  • antonio-casino