{"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 functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate(fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n\n 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 }\n\n warned = true;\n }\n\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\n\nfunction config(name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}","map":{"version":3,"sources":["/Users/tylerkoenig/Code/personal/react-scss2/node_modules/util-deprecate/browser.js"],"names":["module","exports","deprecate","fn","msg","config","warned","deprecated","Error","console","trace","warn","apply","arguments","name","global","localStorage","_","val","String","toLowerCase"],"mappings":"AACA;AACA;AACA;AAEAA,MAAM,CAACC,OAAP,GAAiBC,SAAjB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,SAAT,CAAoBC,EAApB,EAAwBC,GAAxB,EAA6B;AAC3B,MAAIC,MAAM,CAAC,eAAD,CAAV,EAA6B;AAC3B,WAAOF,EAAP;AACD;;AAED,MAAIG,MAAM,GAAG,KAAb;;AACA,WAASC,UAAT,GAAsB;AACpB,QAAI,CAACD,MAAL,EAAa;AACX,UAAID,MAAM,CAAC,kBAAD,CAAV,EAAgC;AAC9B,cAAM,IAAIG,KAAJ,CAAUJ,GAAV,CAAN;AACD,OAFD,MAEO,IAAIC,MAAM,CAAC,kBAAD,CAAV,EAAgC;AACrCI,QAAAA,OAAO,CAACC,KAAR,CAAcN,GAAd;AACD,OAFM,MAEA;AACLK,QAAAA,OAAO,CAACE,IAAR,CAAaP,GAAb;AACD;;AACDE,MAAAA,MAAM,GAAG,IAAT;AACD;;AACD,WAAOH,EAAE,CAACS,KAAH,CAAS,IAAT,EAAeC,SAAf,CAAP;AACD;;AAED,SAAON,UAAP;AACD;AAED;AACA;AACA;AACA;AACA;AACA;AACA;;;AAEA,SAASF,MAAT,CAAiBS,IAAjB,EAAuB;AACrB;AACA,MAAI;AACF,QAAI,CAACC,MAAM,CAACC,YAAZ,EAA0B,OAAO,KAAP;AAC3B,GAFD,CAEE,OAAOC,CAAP,EAAU;AACV,WAAO,KAAP;AACD;;AACD,MAAIC,GAAG,GAAGH,MAAM,CAACC,YAAP,CAAoBF,IAApB,CAAV;AACA,MAAI,QAAQI,GAAZ,EAAiB,OAAO,KAAP;AACjB,SAAOC,MAAM,CAACD,GAAD,CAAN,CAAYE,WAAZ,OAA8B,MAArC;AACD","sourcesContent":["\n/**\n * Module exports.\n */\n\nmodule.exports = deprecate;\n\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 functions\n * will throw an Error when invoked.\n *\n * If `localStorage.traceDeprecation = true` is set, then deprecated functions\n * will invoke `console.trace()` instead of `console.error()`.\n *\n * @param {Function} fn - the function to deprecate\n * @param {String} msg - the string to print to the console when `fn` is invoked\n * @returns {Function} a new \"deprecated\" version of `fn`\n * @api public\n */\n\nfunction deprecate (fn, msg) {\n if (config('noDeprecation')) {\n return fn;\n }\n\n var warned = false;\n 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 }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n}\n\n/**\n * Checks `localStorage` for boolean values for the given `name`.\n *\n * @param {String} name\n * @returns {Boolean}\n * @api private\n */\n\nfunction config (name) {\n // accessing global.localStorage can trigger a DOMException in sandboxed iframes\n try {\n if (!global.localStorage) return false;\n } catch (_) {\n return false;\n }\n var val = global.localStorage[name];\n if (null == val) return false;\n return String(val).toLowerCase() === 'true';\n}\n"]},"metadata":{},"sourceType":"script"}