UNPKG

@tempots/std

Version:

Std library for TypeScript. Natural complement to the Tempo libraries.

19 lines (18 loc) 717 B
const o = (e) => Object.keys(e), r = (e) => Object.values(e), j = (e) => Object.entries(e), b = (e) => Object.fromEntries(e), O = (e, t) => { const n = o(e), c = o(t); if (n.length !== c.length) return !1; for (const s of n) if (!(s in t)) return !1; return !0; }, i = (e) => e != null && Object.getPrototypeOf(e) === Object.prototype, l = (e, ...t) => o(e).reduce((c, s) => (t.includes(s) || (c[s] = e[s]), c), {}), u = (e, t) => Object.assign({}, e, t), f = (e) => Object.keys(e).length === 0; export { f as isEmptyObject, i as isObject, u as mergeObjects, j as objectEntries, b as objectFromEntries, o as objectKeys, r as objectValues, l as removeObjectFields, O as sameObjectKeys };