Skip to content

Commit 6a714d1

Browse files
committed
remove lodash.pick due to CVE-2020-8203
1 parent 013bd2d commit 6a714d1

3 files changed

Lines changed: 9 additions & 13 deletions

File tree

lib/transform.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@ const testValue = require('test-value')
22
const where = testValue.where
33
const arrayify = require('array-back')
44
const extract = require('reduce-extract')
5-
const pick = require('lodash.pick')
65
const omit = require('lodash.omit')
76

7+
function pick(object, keys) {
8+
return keys.reduce((obj, key) => {
9+
if (object && object.hasOwnProperty(key)) {
10+
obj[key] = object[key];
11+
}
12+
return obj;
13+
}, {});
14+
}
15+
816
/**
917
* @module transform
1018
*/

package-lock.json

Lines changed: 0 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"dependencies": {
2222
"array-back": "^6.2.2",
2323
"lodash.omit": "^4.5.0",
24-
"lodash.pick": "^4.4.0",
2524
"reduce-extract": "^1.0.0",
2625
"sort-array": "^4.1.5",
2726
"test-value": "^3.0.0"

0 commit comments

Comments
 (0)