UNPKG

@tempots/std

Version:

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

2 lines (1 loc) 692 B
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=e=>Object.keys(e),r=e=>Object.values(e),b=e=>Object.entries(e),j=e=>Object.fromEntries(e),i=(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},O=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),m=e=>Object.keys(e).length===0;exports.isEmptyObject=m;exports.isObject=O;exports.mergeObjects=u;exports.objectEntries=b;exports.objectFromEntries=j;exports.objectKeys=o;exports.objectValues=r;exports.removeObjectFields=l;exports.sameObjectKeys=i;