Closed is2ei closed 1 year ago
Changed it to use isArray and isBuffer instead of instanceof. I simply measured performance and found isArray is faster than instanceof.
isArray
isBuffer
instanceof
Also, I think isArray and isBuffer are more readable.
npm run test
npm run benchmark
Changed it to use
isArray
andisBuffer
instead ofinstanceof
. I simply measured performance and foundisArray
is faster thaninstanceof
.Also, I think
isArray
andisBuffer
are more readable.Checklist
npm run test
andnpm run benchmark