{“ast”:null,“code”:“/**n * Module exports.n */nmodule.exports = deprecate;n/**n * Mark that a method should not be used.n * Returns a modified function which warns once by default.n *n * If `localStorage.noDeprecation = true` is set, then it is a no-op.n *n * If `localStorage.throwDeprecation = true` is set, then deprecated functionsn * will throw an Error when invoked.n *n * If `localStorage.traceDeprecation = true` is set, then deprecated functionsn * will invoke `console.trace()` instead of `console.error()`.n *n * @param {Function} fn - the function to deprecaten * @param {String} msg - the string to print to the console when `fn` is invokedn * @returns {Function} a new "deprecated" version of `fn`n * @api publicn */nnfunction deprecate(fn, msg) {n if (config('noDeprecation')) {n return fn;n }nn var warned = false;nn function deprecated() {n if (!warned) {n if (config('throwDeprecation')) {n throw new Error(msg);n } else if (config('traceDeprecation')) {n console.trace(msg);n } else {n console.warn(msg);n }nn warned = true;n }nn return fn.apply(this, arguments);n }nn return deprecated;n}n/**n * Checks `localStorage` for boolean values for the given `name`.n *n * @param {String} namen * @returns {Boolean}n * @api privaten */nnnfunction config(name) {n // accessing global.localStorage can trigger a DOMException in sandboxed iframesn try {n if (!global.localStorage) return false;n } catch (_) {n return false;n }nn var val = global.localStorage;n if (null == val) return false;n return String(val).toLowerCase() === 'true';n}”,“map”:null,“metadata”:{},“sourceType”:“module”}