We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7016193 commit 806a0c6Copy full SHA for 806a0c6
lib/generic-parser.js
@@ -34,20 +34,9 @@ module.exports = generic
34
*/
35
36
function generic (parserOptions, parserOverrides) {
37
- var opts = {}
38
-
39
// 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
+ var opts = Object.create(parserOptions)
+ Object.assign(opts, parserOverrides)
51
52
var limit = typeof opts.limit !== 'number'
53
? bytes.parse(opts.limit || '100kb')
0 commit comments