deno.land / x / simpledb@0.3.0 / functions.ts
12345678910111213// object contains subObjectexport function partialContains(object: any, subObject: any):Boolean { // Create arrays of property names const objProps = Object.getOwnPropertyNames(object); const subProps = Object.getOwnPropertyNames(subObject);
if (subProps.length > objProps.length) return false;
for (const subProp of subProps) if (!object.hasOwnProperty(subProp) || object[subProp] !== subObject[subProp]) return false;
return true;}
Version Info
External Dependencies