You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The object returned by lodash-es has an Object prototype, even though the original object was created using Object.create( null ), so the output to the console is [Function: toString]. However, the same function in es-toolkit/compat returns an object without a prototype, so the output to the console is undefined.
While the es-toolkit behavior makes more sense to me, you may consider this a bug if you care about full backward compatibility with lodash.
Given the following code:
The object returned by
lodash-es
has anObject
prototype, even though the original object was created usingObject.create( null )
, so the output to the console is[Function: toString]
. However, the same function ines-toolkit/compat
returns an object without a prototype, so the output to the console isundefined
.While the
es-toolkit
behavior makes more sense to me, you may consider this a bug if you care about full backward compatibility withlodash
.Reproduction: https://stackblitz.com/edit/node-e1e3y8ws?file=index.js
In the console, run
node index.js
.The text was updated successfully, but these errors were encountered: