deno.land / x / simpledb@0.3.0 / functions.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
// 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;}
simpledb

Version Info

Tagged at
3 years ago

External Dependencies

No external dependencies 🎉