UNPKG

@tidyjs/tidy

Version:

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

19 lines (16 loc) 380 B
import { tidy } from './tidy.js'; function when(predicate, fns) { const _when = (items) => { if (typeof predicate === "function") { if (!predicate(items)) return items; } else if (!predicate) { return items; } const results = tidy(items, ...fns); return results; }; return _when; } export { when }; //# sourceMappingURL=when.js.map