Remove need for without function
This commit is contained in:
parent
e1dd08dad3
commit
4754d225af
1 changed files with 2 additions and 7 deletions
|
|
@ -12,13 +12,8 @@ function resolveFunctionKeys(object) {
|
|||
}, {})
|
||||
}
|
||||
|
||||
function without(object, key) {
|
||||
/* eslint-disable no-unused-vars */
|
||||
return (({ [key]: _, ...rest }) => rest)(object)
|
||||
}
|
||||
|
||||
function mergeExtensions(theme) {
|
||||
return mergeWith({}, without(theme, 'extend'), theme.extend, (_, extensions, key) => {
|
||||
function mergeExtensions({ extend, ...theme }) {
|
||||
return mergeWith({}, theme, extend, (_, extensions, key) => {
|
||||
return isFunction(theme[key])
|
||||
? mergedTheme => ({
|
||||
...theme[key](mergedTheme),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue