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

24
node_modules/jss/src/utils/getDynamicStyles.js generated vendored Normal file
View File

@@ -0,0 +1,24 @@
/**
* Extracts a styles object with only props that contain function values.
*/
export default function getDynamicStyles(styles: Object): Object | null {
let to = null
for (const key in styles) {
const value = styles[key]
const type = typeof value
if (type === 'function') {
if (!to) to = {}
to[key] = value
} else if (type === 'object' && value !== null && !Array.isArray(value)) {
const extracted = getDynamicStyles(value)
if (extracted) {
if (!to) to = {}
to[key] = extracted
}
}
}
return to
}