@cryptosheet/sort-by-property

sort an array by multiple properties

Stats

StarsIssuesVersionUpdatedCreatedSize
@cryptosheet/sort-by-property
2.0.03 years ago3 years agoMinified + gzip package size for @cryptosheet/sort-by-property in KB

Readme

@cryptosheet/sort-by-property

sort an array by multiple properties. the order of the properties defines the precedence.

Usage

const sortByProperty = require('@cryptosheet/sort-by-property')
const transactions = [{
  created_at: '...',
  exchange: 'coinbase',
  currencyPair: 'ltc-eur'
}, {
  created_at: '...',
  exchange: 'coinbase',
  currencyPair: 'ltc-eur'
}]

transactions.sort(sortByProperty('created_at', 'exchange', 'currencyPair'))

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.