Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
]
},
"dependencies": {
"array-includes": "^3.1.3",
"object.assign": "^4.1.2"
"array-includes": "^3.1.3"
}
}
4 changes: 1 addition & 3 deletions src/values/expressions/ObjectExpression.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import assign from 'object.assign';

/**
* Extractor function for an ObjectExpression type value node.
* An object expression is using {}.
Expand All @@ -14,7 +12,7 @@ export default function extractValueFromObjectExpression(value) {
// Support types: SpreadProperty and ExperimentalSpreadProperty
if (/^(?:Experimental)?Spread(?:Property|Element)$/.test(property.type)) {
if (property.argument.type === 'ObjectExpression') {
return assign(object, extractValueFromObjectExpression(property.argument));
return Object.assign(object, extractValueFromObjectExpression(property.argument));
}
} else {
object[getValue(property.key)] = getValue(property.value);
Expand Down