UNPKG

airtable

Version:

The official Airtable JavaScript library.

28 lines 789 B
"use strict"; var didWarnForDeprecation = {}; /** * Convenience function for marking a function as deprecated. * * Will emit a warning the first time that function is called. * * @param fn the function to mark as deprecated. * @param key a unique key identifying the function. * @param message the warning message. * * @return a wrapped function */ function deprecate(fn, key, message) { return function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (!didWarnForDeprecation[key]) { didWarnForDeprecation[key] = true; console.warn(message); } fn.apply(this, args); }; } module.exports = deprecate; //# sourceMappingURL=deprecate.js.map