Completely updated React, fixed #11, (hopefully)
This commit is contained in:
11
goTorrentWebUI/node_modules/material-ui/es/utils/helpers.js
generated
vendored
11
goTorrentWebUI/node_modules/material-ui/es/utils/helpers.js
generated
vendored
@@ -1,15 +1,18 @@
|
||||
import _Object$keys from 'babel-runtime/core-js/object/keys';
|
||||
// weak
|
||||
|
||||
import warning from 'warning';
|
||||
|
||||
export function capitalizeFirstLetter(string) {
|
||||
warning(typeof string === 'string', 'Material-UI: capitalizeFirstLetter(string) expects a string argument.');
|
||||
export function capitalize(string) {
|
||||
if (process.env.NODE_ENV !== 'production' && typeof string !== 'string') {
|
||||
throw new Error('Material-UI: capitalize(string) expects a string argument.');
|
||||
}
|
||||
|
||||
return string.charAt(0).toUpperCase() + string.slice(1);
|
||||
}
|
||||
|
||||
export function contains(obj, pred) {
|
||||
return Object.keys(pred).every(key => {
|
||||
return _Object$keys(pred).every(key => {
|
||||
return obj.hasOwnProperty(key) && obj[key] === pred[key];
|
||||
});
|
||||
}
|
||||
@@ -46,7 +49,7 @@ export function find(arr, pred) {
|
||||
*/
|
||||
export function createChainedFunction(...funcs) {
|
||||
return funcs.filter(func => func != null).reduce((acc, func) => {
|
||||
warning(typeof func === 'function', 'Material-UI: invalid Argument Type, must only provide functions, undefined, or null.');
|
||||
process.env.NODE_ENV !== "production" ? warning(typeof func === 'function', 'Material-UI: invalid Argument Type, must only provide functions, undefined, or null.') : void 0;
|
||||
|
||||
return function chainedFunction(...args) {
|
||||
acc.apply(this, args);
|
||||
|
Reference in New Issue
Block a user