UNPKG

rumble-charts

Version:

Truly declarative React charts components

19 lines (14 loc) 425 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); var tslib_es6 = require('../external/tslib/tslib.es6.js'); function sortBy(list, field) { var copy = tslib_es6.__spreadArray([], list, true); copy.sort(function (a, b) { if (a[field] === b[field]) { return 0; } return a[field] > b[field] ? 1 : -1; }); return copy; } exports.sortBy = sortBy;