lightstep-tracer
Version:
> ❗ **This instrumentation is no longer recommended**. Please review [documentation on setting up and configuring the OpenTelemetry Node.js Launcher](https://github.com/lightstep/otel-launcher-node) or [OpenTelemetry JS (Browser)](https://github.com/open-
28 lines (22 loc) • 762 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = _each;
// Underscore.js-like wrapper to iterate object key-values. Note that even for completely
// internal objects, packages may modify default Object prototypes and properties
// (e.g. Ember.js) so it's almost never safe to assume a particular object can
// iterated with for-in.
// TODO: remove this function and replace with Object.keys, Object.values, ... (spread) or other.
function _each(obj, cb) {
if (!obj) {
return;
} // eslint-disable-next-line no-restricted-syntax
for (var key in obj) {
if (hasOwnProperty.call(obj, key)) {
cb(obj[key], key);
}
}
}
module.exports = exports.default;
//# sourceMappingURL=_each.js.map
;