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
Looks like the issue is that the current implementation creates objects where the items of the arrays are the properties, which causes the behavior you explained since items are casted to strings (https://github.com/angus-c/just/blob/master/packages/array-intersect/index.mjs#L35); e.g. [2, 3, 5, 6] becomes { '2': true, '3': true, '5': true, '6': true }, so then checking if "2" is a property of that object results in that issue.
Yeah, there's some workaround and I'm using a set-based method which is O(n). Just curious if the library author is willing to fix this, as it's a breaking change.
lodash.intersection
gives[5, 6]
on such cases.The text was updated successfully, but these errors were encountered: