Skip to content

Commit

Permalink
remove lodash.pick due to CVE-2020-8203
Browse files Browse the repository at this point in the history
  • Loading branch information
mknudsen committed Jan 29, 2024
1 parent 013bd2d commit 6a714d1
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 13 deletions.
10 changes: 9 additions & 1 deletion lib/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@ const testValue = require('test-value')
const where = testValue.where
const arrayify = require('array-back')
const extract = require('reduce-extract')
const pick = require('lodash.pick')
const omit = require('lodash.omit')

function pick(object, keys) {
return keys.reduce((obj, key) => {
if (object && object.hasOwnProperty(key)) {
obj[key] = object[key];
}
return obj;
}, {});
}

/**
* @module transform
*/
Expand Down
11 changes: 0 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"dependencies": {
"array-back": "^6.2.2",
"lodash.omit": "^4.5.0",
"lodash.pick": "^4.4.0",
"reduce-extract": "^1.0.0",
"sort-array": "^4.1.5",
"test-value": "^3.0.0"
Expand Down

0 comments on commit 6a714d1

Please sign in to comment.