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>
17 lines • 562 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.foundTypes = void 0;
//extract __typenames after GraphQL Response
const foundTypes = (graphQLResponse) => {
const stringy = JSON.stringify(graphQLResponse);
let regex = /(__typename)\":\"(.+?)\"/g;
let found = new Set(stringy.match(regex));
const subArr = [];
for (let item of found) {
let newItem = item.slice(13, -1);
subArr.push(newItem);
}
return subArr;
};
exports.foundTypes = foundTypes;
//# sourceMappingURL=foundTypes.js.map