UNPKG

@tidyjs/tidy

Version:

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

15 lines (12 loc) 372 B
import { singleOrArray } from './helpers/singleOrArray.js'; function addRows(itemsToAdd) { const _addRows = (items) => { if (typeof itemsToAdd === "function") { return [...items, ...singleOrArray(itemsToAdd(items))]; } return [...items, ...singleOrArray(itemsToAdd)]; }; return _addRows; } export { addRows }; //# sourceMappingURL=addRows.js.map