UNPKG

use-axios

Version:

Simple Axios hook for React. Use React Suspense to show loading indicator and Error Boundary to show request errors.

23 lines (18 loc) 779 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = obsoleteWithReplacement; function obsoleteWithReplacement(replacementFunction, oldFnName) { var warned; function wrapper() { if (!warned && console && console.warn) { warned = true; console.warn("WARNING! Obsolete function called. Function '".concat(oldFnName, "' has been deprecated and will be removed in the next major release, please use the new '").concat(replacementFunction.name, "' function instead!")); } replacementFunction.call.apply(replacementFunction, [this].concat(Array.prototype.slice.call(arguments))); } wrapper.prototype = replacementFunction.prototype; return wrapper; } //# sourceMappingURL=obsoleteWithReplacement.js.map