es-toolkit icon indicating copy to clipboard operation
es-toolkit copied to clipboard

Different behaviour with lodash assignIn

Open SebastienElet opened this issue 8 months ago • 0 comments

Hello,

We have a different behaviour by replacing lodash with es-toolkit/compat.

Here is a code sample to reproduce the issue

import { assignIn } from 'es-toolkit/compat'
import { assignIn as assignInLodash } from 'lodash'

const values = [{ workId: undefined }, { exerciseId: '1' }]
const assignInLodashResult = assignInLodash({}, ...values)
const assignInEsToolKitResult = assignIn({}, ...values)

console.dir({
  assignInLodashResult,
  assignInEsToolKitResult,
})

The output is

{
  assignInLodashResult: { workId: undefined, exerciseId: '1' },
  assignInEsToolKitResult: { exerciseId: '1' }
}

I use es-tookit 1.32 and lodash 4.17.11

SebastienElet avatar Feb 10 '25 17:02 SebastienElet