source: frontend/node_modules/axios/lib/helpers/deprecatedMethod.js

Last change on this file was 9af201e, checked in by MBK <marija.karapandzova@…>, 13 days ago

Fix frontend appearance

  • Property mode set to 100644
File size: 777 bytes
Line 
1'use strict';
2
3/*eslint no-console:0*/
4
5/**
6 * Supply a warning to the developer that a method they are using
7 * has been deprecated.
8 *
9 * @param {string} method The name of the deprecated method
10 * @param {string} [instead] The alternate method to use if applicable
11 * @param {string} [docs] The documentation URL to get further details
12 *
13 * @returns {void}
14 */
15export default function deprecatedMethod(method, instead, docs) {
16 try {
17 console.warn(
18 'DEPRECATED method `' +
19 method +
20 '`.' +
21 (instead ? ' Use `' + instead + '` instead.' : '') +
22 ' This method will be removed in a future release.'
23 );
24
25 if (docs) {
26 console.warn('For more information about usage see ' + docs);
27 }
28 } catch (e) {
29 /* Ignore */
30 }
31}
Note: See TracBrowser for help on using the repository browser.