UNPKG

rumble-charts

Version:

Truly declarative React charts components

15 lines (12 loc) 335 B
import { __spreadArray } from '../external/tslib/tslib.es6.js'; function sortBy(list, field) { var copy = __spreadArray([], list, true); copy.sort(function (a, b) { if (a[field] === b[field]) { return 0; } return a[field] > b[field] ? 1 : -1; }); return copy; } export { sortBy };