Closed mikaelkaron closed 1 year ago
For sure. I was planning on doing that anyways, just made a draft to know if you are ok with the solution.
The issue with this PR is, that it is a breaking change. Also it would mean that it would probably not work in Browser because Browser does not have a builtin Buffer. So a instanceof Buffer would throw.
Also i can not agree with the assessment, that Array.isArray(Buffer.from([])) or Buffer.from([]) is returning true. So the Array Merge logic does not get applied. I assume It happens only if there is a buffer polyfill existing which is using Array as parent class.
The issue with this PR is, that it is a breaking change. Also it would mean that it would probably not work in Browser because Browser does not have a builtin Buffer. So a instanceof Buffer would throw.
This is true.
Also i can not agree with the assessment, that Array.isArray(Buffer.from([])) or Buffer.from([]) is returning true. So the Array Merge logic does not get applied. I assume It happens only if there is a buffer polyfill existing which is using Array as parent class.
I was to quick on my assessment there, the array merge logic does indeed not get applied. I'll try to rework the MR to manage these two points.
closes #10
Checklist
npm run test
andnpm run benchmark