{"version":3,"file":"deprecated.cjs","sources":["../../../../../../node_modules/@sinonjs/commons/lib/deprecated.js"],"sourcesContent":["/* eslint-disable no-console */\n\"use strict\";\n\n/**\n * Returns a function that will invoke the supplied function and print a\n * deprecation warning to the console each time it is called.\n * @param  {Function} func\n * @param  {string} msg\n * @returns {Function}\n */\nexports.wrap = function (func, msg) {\n    var wrapped = function () {\n        exports.printWarning(msg);\n        return func.apply(this, arguments);\n    };\n    if (func.prototype) {\n        wrapped.prototype = func.prototype;\n    }\n    return wrapped;\n};\n\n/**\n * Returns a string which can be supplied to `wrap()` to notify the user that a\n * particular part of the sinon API has been deprecated.\n * @param  {string} packageName\n * @param  {string} funcName\n * @returns {string}\n */\nexports.defaultMsg = function (packageName, funcName) {\n    return `${packageName}.${funcName} is deprecated and will be removed from the public API in a future version of ${packageName}.`;\n};\n\n/**\n * Prints a warning on the console, when it exists\n * @param  {string} msg\n * @returns {undefined}\n */\nexports.printWarning = function (msg) {\n    /* istanbul ignore next */\n    if (typeof process === \"object\" && process.emitWarning) {\n        // Emit Warnings in Node\n        process.emitWarning(msg);\n    } else if (console.info) {\n        console.info(msg);\n    } else {\n        console.log(msg);\n    }\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,OAAA,CAAA,IAAA,GAAe,UAAU,IAAI,EAAE,GAAG,EAAE;MAChC,IAAI,OAAO,GAAG,YAAY;AAC9B,UAAQ,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC;UACzB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,SAAS,CAAC;MAC1C,CAAK;AACL,MAAI,IAAI,IAAI,CAAC,SAAS,EAAE;AACxB,UAAQ,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS;AAC1C,MAAA;AACA,MAAI,OAAO,OAAO;EAClB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAA,OAAA,CAAA,UAAA,GAAqB,UAAU,WAAW,EAAE,QAAQ,EAAE;AACtD,MAAI,OAAO,CAAC,EAAE,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,8EAA8E,EAAE,WAAW,CAAC,CAAC,CAAC;EACpI,CAAC;;AAED;AACA;AACA;AACA;AACA;EACA,OAAA,CAAA,YAAA,GAAuB,UAAU,GAAG,EAAE;AACtC;MACI,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,CAAC,WAAW,EAAE;AAC5D;AACA,UAAQ,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC;AAChC,MAAA,CAAK,MAAM,IAAI,OAAO,CAAC,IAAI,EAAE;AAC7B,UAAQ,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC;AACzB,MAAA,CAAK,MAAM;AACX,UAAQ,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC;AACxB,MAAA;EACA,CAAC,CAAA;;;;;;;","x_google_ignoreList":[0]}