UNPKG

ts-vista

Version:
34 lines (31 loc) 777 B
var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); // src/functions/split.ts var split = /* @__PURE__ */ __name((object, keys) => { const within = {}; const without = {}; for (const key in object) { if (keys.includes(key)) { within[key] = object[key]; } else { without[key] = object[key]; } } return { within, without }; }, "split"); // src/functions/pick.ts var pick = /* @__PURE__ */ __name((object, keys) => { return split(object, keys).within; }, "pick"); // src/functions/omit.ts var omit = /* @__PURE__ */ __name((object, keys) => { return split(object, keys).without; }, "omit"); export { omit, pick }; //# sourceMappingURL=index.mjs.map