UNPKG

atlantis-cache-temp

Version:

<div align="center"> <h1>Atlantis-Cache</h1> <img src="https://github.com/settnaing199/npm-package-test/blob/main/Screen%20Shot%202021-06-15%20at%202.36.35%20PM.png" width="300px" align="center"/> </div>

16 lines 624 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.isSubset = void 0; /* compare incoming queryStructure and existing queryStructure in redis to determine if all the fields in the incoming query exist in the cache*/ const isSubset = (rootObj, subObj) => { return Object.keys(subObj).every((el) => { if (typeof subObj[el] == 'object') { return isSubset(rootObj[el], subObj[el]); } if (!subObj || !rootObj) return false; return subObj[el] === rootObj[el]; }); }; exports.isSubset = isSubset; //# sourceMappingURL=isSubset.js.map