@material-ui/utils
Advanced tools
Comparing version 4.7.1 to 4.9.6
@@ -8,3 +8,3 @@ "use strict"; | ||
}); | ||
exports.isObject = isObject; | ||
exports.isPlainObject = isPlainObject; | ||
exports.default = deepmerge; | ||
@@ -16,4 +16,4 @@ | ||
function isObject(item) { | ||
return item && (0, _typeof2.default)(item) === 'object' && !Array.isArray(item); | ||
function isPlainObject(item) { | ||
return item && (0, _typeof2.default)(item) === 'object' && item.constructor === Object; | ||
} | ||
@@ -27,3 +27,3 @@ | ||
if (isObject(target) && isObject(source)) { | ||
if (isPlainObject(target) && isPlainObject(source)) { | ||
Object.keys(source).forEach(function (key) { | ||
@@ -35,3 +35,3 @@ // Avoid prototype pollution | ||
if (isObject(source[key]) && key in target) { | ||
if (isPlainObject(source[key]) && key in target) { | ||
output[key] = deepmerge(target[key], source[key], options); | ||
@@ -38,0 +38,0 @@ } else { |
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
export function isObject(item) { | ||
return item && typeof item === 'object' && !Array.isArray(item); | ||
export function isPlainObject(item) { | ||
return item && typeof item === 'object' && item.constructor === Object; | ||
} | ||
@@ -10,3 +10,3 @@ export default function deepmerge(target, source, options = { | ||
if (isObject(target) && isObject(source)) { | ||
if (isPlainObject(target) && isPlainObject(source)) { | ||
Object.keys(source).forEach(key => { | ||
@@ -18,3 +18,3 @@ // Avoid prototype pollution | ||
if (isObject(source[key]) && key in target) { | ||
if (isPlainObject(source[key]) && key in target) { | ||
output[key] = deepmerge(target[key], source[key], options); | ||
@@ -21,0 +21,0 @@ } else { |
@@ -1,2 +0,2 @@ | ||
import { ForwardRef } from 'react-is'; // Simplified polyfill for IE 11 support | ||
import { ForwardRef, Memo } from 'react-is'; // Simplified polyfill for IE 11 support | ||
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3 | ||
@@ -52,2 +52,5 @@ | ||
case Memo: | ||
return getWrappedName(Component, Component.type, 'memo'); | ||
default: | ||
@@ -54,0 +57,0 @@ return undefined; |
import _extends from "@babel/runtime/helpers/esm/extends"; | ||
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
export function isObject(item) { | ||
return item && _typeof(item) === 'object' && !Array.isArray(item); | ||
export function isPlainObject(item) { | ||
return item && _typeof(item) === 'object' && item.constructor === Object; | ||
} | ||
@@ -12,3 +12,3 @@ export default function deepmerge(target, source) { | ||
if (isObject(target) && isObject(source)) { | ||
if (isPlainObject(target) && isPlainObject(source)) { | ||
Object.keys(source).forEach(function (key) { | ||
@@ -20,3 +20,3 @@ // Avoid prototype pollution | ||
if (isObject(source[key]) && key in target) { | ||
if (isPlainObject(source[key]) && key in target) { | ||
output[key] = deepmerge(target[key], source[key], options); | ||
@@ -23,0 +23,0 @@ } else { |
import _typeof from "@babel/runtime/helpers/esm/typeof"; | ||
import { ForwardRef } from 'react-is'; // Simplified polyfill for IE 11 support | ||
import { ForwardRef, Memo } from 'react-is'; // Simplified polyfill for IE 11 support | ||
// https://github.com/JamesMGreene/Function.name/blob/58b314d4a983110c3682f1228f845d39ccca1817/Function.name.js#L3 | ||
@@ -54,2 +54,5 @@ | ||
case Memo: | ||
return getWrappedName(Component, Component.type, 'memo'); | ||
default: | ||
@@ -56,0 +59,0 @@ return undefined; |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v4.7.1 | ||
/** @license Material-UI v4.9.6 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
@@ -68,2 +68,5 @@ "use strict"; | ||
case _reactIs.Memo: | ||
return getWrappedName(Component, Component.type, 'memo'); | ||
default: | ||
@@ -70,0 +73,0 @@ return undefined; |
@@ -1,2 +0,2 @@ | ||
/** @license Material-UI v4.7.1 | ||
/** @license Material-UI v4.9.6 | ||
* | ||
@@ -3,0 +3,0 @@ * This source code is licensed under the MIT license found in the |
{ | ||
"name": "@material-ui/utils", | ||
"version": "4.7.1", | ||
"version": "4.9.6", | ||
"private": false, | ||
@@ -5,0 +5,0 @@ "author": "Material-UI Team", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
565918
664