@newrelic/newrelic-capacitor-plugin
Version:
NewRelic Plugin for ionic Capacitor
18 lines • 597 B
JavaScript
/**
* Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value
* Any copyright is dedicated to the Public Domain: https://creativecommons.org/publicdomain/zero/1.0/
*/
const getCircularReplacer = () => {
const seen = new WeakSet();
return (_key, value) => {
if (typeof value === "object" && value !== null) {
if (seen.has(value)) {
return;
}
seen.add(value);
}
return value;
};
};
export default getCircularReplacer;
//# sourceMappingURL=circular-replacer.js.map