Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
fix(deps): update dependency filter-obj to v5 (#1246)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency filter-obj to v5

* chore: migrate to new API

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Daniel Tschinder <231804+danez@users.noreply.github.com>
  • Loading branch information
renovate[bot] and danez committed Nov 2, 2022
1 parent 93aed16 commit 5d02ad8
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
19 changes: 11 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"end-of-stream": "^1.4.4",
"es-module-lexer": "^1.0.0",
"execa": "^5.0.0",
"filter-obj": "^2.0.1",
"filter-obj": "^5.0.0",
"find-up": "^6.0.0",
"glob": "^8.0.3",
"is-builtin-module": "^3.1.0",
Expand Down
6 changes: 4 additions & 2 deletions src/utils/remove_undefined.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import filterObj from 'filter-obj'
import { includeKeys } from 'filter-obj'

const isUndefined = (key: unknown, value: unknown) => value !== undefined

export const removeUndefined = function <T extends { [key: string]: unknown }>(obj: T): T {
return filterObj(obj, (key, value) => value !== undefined) as T
return includeKeys(obj, isUndefined) as T
}

1 comment on commit 5d02ad8

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⏱ Benchmark results

largeDepsEsbuild: 2.5s

largeDepsNft: 12.4s

largeDepsZisi: 18.6s

Please sign in to comment.