Security upgrades

This commit is contained in:
2020-07-15 19:54:48 +02:00
parent 59cc6c54cd
commit ad8ed283d2
3164 changed files with 408897 additions and 28 deletions

35
node_modules/@material-ui/system/es/compose.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
import _extends from "@babel/runtime/helpers/esm/extends";
import merge from './merge';
function compose(...styles) {
const fn = props => styles.reduce((acc, style) => {
const output = style(props);
if (output) {
return merge(acc, output);
}
return acc;
}, {}); // Alternative approach that doesn't yield any performance gain.
// const handlers = styles.reduce((acc, style) => {
// style.filterProps.forEach(prop => {
// acc[prop] = style;
// });
// return acc;
// }, {});
// const fn = props => {
// return Object.keys(props).reduce((acc, prop) => {
// if (handlers[prop]) {
// return merge(acc, handlers[prop](props));
// }
// return acc;
// }, {});
// };
fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => _extends(acc, style.propTypes), {}) : {};
fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);
return fn;
}
export default compose;