UNPKG

@tidyjs/tidy

Version:

Tidy up your data with JavaScript, inspired by dplyr and the tidyverse

20 lines (16 loc) 405 B
'use strict'; Object.defineProperty(exports, '__esModule', { value: true }); function tidy(items, ...fns) { if (typeof items === "function") { throw new Error("You must supply the data as the first argument to tidy()"); } let result = items; for (const fn of fns) { if (fn) { result = fn(result); } } return result; } exports.tidy = tidy; //# sourceMappingURL=tidy.js.map