Add files
This commit is contained in:
commit
bb80829159
18195 changed files with 2122994 additions and 0 deletions
68
509bba0_unpacked_with_node_modules/~/warning/browser.js
generated
Executable file
68
509bba0_unpacked_with_node_modules/~/warning/browser.js
generated
Executable file
|
@ -0,0 +1,68 @@
|
|||
/**
|
||||
* Copyright 2014-2015, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Similar to invariant but only logs a warning if the condition is not met.
|
||||
* This can be used to log issues in development environments in critical
|
||||
* paths. Removing the logging code for production environments will keep the
|
||||
* same logic and follow the same code paths.
|
||||
*/
|
||||
|
||||
var warning = function() {};
|
||||
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
warning = function(condition, format, args) {
|
||||
var len = arguments.length;
|
||||
args = new Array(len > 2 ? len - 2 : 0);
|
||||
for (var key = 2; key < len; key++) {
|
||||
args[key - 2] = arguments[key];
|
||||
}
|
||||
if (format === undefined) {
|
||||
throw new Error(
|
||||
'`warning(condition, format, ...args)` requires a warning ' +
|
||||
'message argument'
|
||||
);
|
||||
}
|
||||
|
||||
if (format.length < 10 || (/^[s\W]*$/).test(format)) {
|
||||
throw new Error(
|
||||
'The warning format should be able to uniquely identify this ' +
|
||||
'warning. Please, use a more descriptive format than: ' + format
|
||||
);
|
||||
}
|
||||
|
||||
if (!condition) {
|
||||
var argIndex = 0;
|
||||
var message = 'Warning: ' +
|
||||
format.replace(/%s/g, function() {
|
||||
return args[argIndex++];
|
||||
});
|
||||
if (typeof console !== 'undefined') {
|
||||
console.error(message);
|
||||
}
|
||||
try {
|
||||
// This error was thrown as a convenience so that you can use this stack
|
||||
// to find the callsite that caused this warning to fire.
|
||||
throw new Error(message);
|
||||
} catch(x) {}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
module.exports = warning;
|
||||
|
||||
|
||||
|
||||
//////////////////
|
||||
// WEBPACK FOOTER
|
||||
// ./~/warning/browser.js
|
||||
// module id = 5565
|
||||
// module chunks = 4
|
Loading…
Add table
Add a link
Reference in a new issue