UNPKG

use-axios

Version:

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

16 lines (13 loc) 670 B
export default 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