Skip to content

Commit 9f27226

Browse files
authored
fix: drop filter-obj (#6592)
1 parent 51848e4 commit 9f27226

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

package-lock.json

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

packages/redirect-parser/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
"dependencies": {
2929
"@iarna/toml": "^2.2.5",
3030
"fast-safe-stringify": "^2.1.1",
31-
"filter-obj": "^6.0.0",
3231
"is-plain-obj": "^4.0.0",
3332
"path-exists": "^5.0.0"
3433
},

packages/redirect-parser/src/normalize.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { includeKeys } from 'filter-obj'
21
import isPlainObj from 'is-plain-obj'
32

43
import { normalizeConditions } from './conditions.js'
@@ -141,9 +140,9 @@ const isProxy = function (status, to) {
141140
}
142141

143142
const removeUndefinedValues = function (object) {
144-
return includeKeys(object, isDefined)
143+
return Object.fromEntries(Object.entries(object).filter(([, value]) => isDefined(value)))
145144
}
146145

147-
const isDefined = function (key, value) {
146+
const isDefined = function (value) {
148147
return value !== undefined
149148
}

0 commit comments

Comments
 (0)