@tidyjs/tidy
Version:
Tidy up your data with JavaScript, inspired by dplyr and the tidyverse
16 lines (14 loc) • 322 B
JavaScript
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;
}
export { tidy };
//# sourceMappingURL=tidy.js.map