@tidyjs/tidy
Version:
Tidy up your data with JavaScript, inspired by dplyr and the tidyverse
23 lines (18 loc) • 467 B
JavaScript
Object.defineProperty(exports, '__esModule', { value: true });
var tidy = require('./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.tidy(items, ...fns);
return results;
};
return _when;
}
exports.when = when;
//# sourceMappingURL=when.js.map
;