pat310 / quick-pivot

Quickly format data to create a pivot table
https://www.npmjs.com/package/quick-pivot
MIT License
63 stars 21 forks source link

Adding ability to provide custom sort function #71

Closed corvana-nbaker closed 6 years ago

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.008%) to 98.889% when pulling ee31fdee20aab0d309fb5ffee470d3e2de05dc7f on corvana-nbaker:master into 5c82c66ba99b08375289f8c287e0a1c7c714fbca on pat310:master.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.008%) to 98.889% when pulling 9d8e823c959738a16c9fc0a38f819c738bd60a35 on corvana-nbaker:master into 5c82c66ba99b08375289f8c287e0a1c7c714fbca on pat310:master.

coveralls commented 6 years ago

Coverage Status

Coverage decreased (-0.4%) to 98.529% when pulling abc8c235f7c9212ab438d4c6f3a570bee4b5a6d2 on corvana-nbaker:master into 5c82c66ba99b08375289f8c287e0a1c7c714fbca on pat310:master.

corvana-nbaker commented 6 years ago

I've changed the logic. I'd like to add a couple constants for sort behavior. Right now it will skip the sort step if the custom sort function is an empty function () => {}. It would be much better to be able to pass Pivot.Sort.NONE, and add Pivot.Sort.DEFAULT.

corvana-nbaker commented 6 years ago

Looks like the coverage drop was from adding the sortFunc to update(). I'll need to add a test for that

jrweinb commented 6 years ago

Is there any update with this PR? It looks like a great feature.

pat310 commented 6 years ago

@jrweinb @corvana-nbaker

Merged and published in version 2.6.0