Last change
on this file since b738035 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
314 bytes
|
Rev | Line | |
---|
[6a3a178] | 1 | /*
|
---|
| 2 | MIT License http://www.opensource.org/licenses/mit-license.php
|
---|
| 3 | Author Tobias Koppers @sokra
|
---|
| 4 | */
|
---|
| 5 | "use strict";
|
---|
| 6 |
|
---|
| 7 | exports.deprecate = (fn, msg) => {
|
---|
| 8 | let once = true;
|
---|
| 9 | return function() {
|
---|
| 10 | if (once) {
|
---|
| 11 | console.warn("DeprecationWarning: " + msg);
|
---|
| 12 | once = false;
|
---|
| 13 | }
|
---|
| 14 | return fn.apply(this, arguments);
|
---|
| 15 | };
|
---|
| 16 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.