UNPKG

@tidyjs/tidy

Version:

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

10 lines (8 loc) 331 B
function assignGroupKeys(d, keys) { if (d == null || typeof d !== "object" || Array.isArray(d)) return d; const keysObj = Object.fromEntries(keys.filter((key) => typeof key[0] !== "function" && key[0] != null)); return Object.assign(keysObj, d); } export { assignGroupKeys }; //# sourceMappingURL=assignGroupKeys.js.map