Latest updates from IceHrmPro
This commit is contained in:
53
web/node_modules/rc-util/lib/warning.js
generated
vendored
Normal file
53
web/node_modules/rc-util/lib/warning.js
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.warning = warning;
|
||||
exports.note = note;
|
||||
exports.resetWarned = resetWarned;
|
||||
exports.call = call;
|
||||
exports.warningOnce = warningOnce;
|
||||
exports.noteOnce = noteOnce;
|
||||
exports.default = void 0;
|
||||
|
||||
/* eslint-disable no-console */
|
||||
var warned = {};
|
||||
|
||||
function warning(valid, message) {
|
||||
// Support uglify
|
||||
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
|
||||
console.error("Warning: ".concat(message));
|
||||
}
|
||||
}
|
||||
|
||||
function note(valid, message) {
|
||||
// Support uglify
|
||||
if (process.env.NODE_ENV !== 'production' && !valid && console !== undefined) {
|
||||
console.warn("Note: ".concat(message));
|
||||
}
|
||||
}
|
||||
|
||||
function resetWarned() {
|
||||
warned = {};
|
||||
}
|
||||
|
||||
function call(method, valid, message) {
|
||||
if (!valid && !warned[message]) {
|
||||
method(false, message);
|
||||
warned[message] = true;
|
||||
}
|
||||
}
|
||||
|
||||
function warningOnce(valid, message) {
|
||||
call(warning, valid, message);
|
||||
}
|
||||
|
||||
function noteOnce(valid, message) {
|
||||
call(note, valid, message);
|
||||
}
|
||||
|
||||
var _default = warningOnce;
|
||||
/* eslint-enable */
|
||||
|
||||
exports.default = _default;
|
||||
Reference in New Issue
Block a user