Blame view

天文台pc/tianwentai-ui/node_modules/tapable/lib/util-browser.js 422 Bytes
bc518174   王天杨   提交两个项目文件
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
  /*
  	MIT License http://www.opensource.org/licenses/mit-license.php
  	Author Tobias Koppers @sokra
  */
  "use strict";
  
  module.exports.deprecate = (fn, msg) => {
  	let once = true;
  	return function deprecate() {
  		if (once) {
  			// eslint-disable-next-line no-console
  			console.warn(`DeprecationWarning: ${msg}`);
  			once = false;
  		}
  		// eslint-disable-next-line prefer-rest-params
  		return fn.apply(this, arguments);
  	};
  };