We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
node -v v22.11.0
See Describe the bug
import { defuFn } from 'defu' const filterDist = (val: string[]) => val.filter(i => i !== 'dist') const addTwenty = (val: number) => val + 20 const addTen = (val: number) => val + 10 const res = defuFn( { count: addTwenty, num: addTen, items: filterDist, }, { count: 10, num: 5, items: ['node_modules', 'test'], }, { count: 5, num: 3, items: ['temp', 'dist'], }, ) console.dir({ res }, { depth: 5 }) // expected: /* { res: { count: 30, num: 15, items: [ "node_modules", "test", "temp"] } } */ // received: /* { res: { count: 30, num: 15, items: [ "node_modules", "test", "temp", "dist" ] } } */
When entering the second loop, the function has already been replaced with a value
defu/src/defu.ts
Line 53 in 70cffe5
No response
The text was updated successfully, but these errors were encountered:
Maybe this is a idea.
// createDefu _defu( arguments_[0], arguments_.slice(1).reduce((p, c) => _defu(p, c, "", merger), {} as any), "", merger, )
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Environment
node -v
v22.11.0
Reproduction
See Describe the bug
Describe the bug
Additional context
When entering the second loop, the function has already been replaced with a value
defu/src/defu.ts
Line 53 in 70cffe5
Logs
No response
The text was updated successfully, but these errors were encountered: