UNPKG

@fluentui/styles

Version:
33 lines (31 loc) 910 B
"use strict"; exports.__esModule = true; exports.withDebugId = void 0; var _debugEnabled = require("./debugEnabled"); var withDebugId = process.env.NODE_ENV === 'production' ? function (data, debugId) { return data; } : function (data, debugId) { if (!_debugEnabled.isEnabled || debugId === undefined) { return data; } if (typeof data === 'object' && data !== null) { if (!Object.prototype.hasOwnProperty.call(data, '_debugId')) { var copy = Object.assign({}, data); Object.defineProperty(copy, '_debugId', { value: debugId, writable: false, enumerable: false }); return copy; } } if (typeof data === 'function') { return function () { var result = data.apply(void 0, arguments); return withDebugId(result, debugId); }; } return data; }; exports.withDebugId = withDebugId; //# sourceMappingURL=withDebugId.js.map