Skip to content
This repository was archived by the owner on Sep 11, 2021. It is now read-only.

Commit f1bc953

Browse files
committed
Use flatMap from lodash instead of node 11
1 parent d319f40 commit f1bc953

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const map = require('lodash/map')
33
const toPairs = require('lodash/toPairs')
44
const fromPairs = require('lodash/fromPairs')
55
const mergeWith = require('lodash/mergeWith')
6+
const flatMap = require('lodash/flatMap')
67
const isEmpty = require('lodash/isEmpty')
78
const isArray = require('lodash/isArray')
89
const isFunction = require('lodash/isFunction')
@@ -29,7 +30,7 @@ function merge(...options) {
2930
}
3031

3132
function flattenOptions(options) {
32-
return merge(...toPairs(options).flatMap(([keys, value]) => {
33+
return merge(...flatMap(toPairs(options), ([keys, value]) => {
3334
return fromPairs(keys.split(', ').map(key => [key, value]))
3435
}))
3536
}

0 commit comments

Comments
 (0)