Completely updated React, fixed #11, (hopefully)

This commit is contained in:
2018-03-04 19:11:49 -05:00
parent 6e0afd6e2a
commit 34e5f5139a
13674 changed files with 333464 additions and 473223 deletions

View File

@@ -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);