File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -34,20 +34,9 @@ module.exports = generic
34
34
*/
35
35
36
36
function generic ( parserOptions , parserOverrides ) {
37
- var opts = { }
38
-
39
37
// Squash the options and the overrides down into one object
40
- var squashKey
41
- for ( squashKey in ( parserOptions || { } ) ) {
42
- if ( Object . prototype . hasOwnProperty . call ( parserOptions , squashKey ) ) {
43
- opts [ squashKey ] = parserOptions [ squashKey ]
44
- }
45
- }
46
- for ( squashKey in ( parserOverrides || { } ) ) {
47
- if ( Object . prototype . hasOwnProperty . call ( parserOverrides , squashKey ) ) {
48
- opts [ squashKey ] = parserOverrides [ squashKey ]
49
- }
50
- }
38
+ var opts = Object . create ( parserOptions )
39
+ Object . assign ( opts , parserOverrides )
51
40
52
41
var limit = typeof opts . limit !== 'number'
53
42
? bytes . parse ( opts . limit || '100kb' )
You can’t perform that action at this time.
0 commit comments