arr-diff icon indicating copy to clipboard operation
arr-diff copied to clipboard

[New Feature]: Suggestions

Open sricharankrishnan opened this issue 2 years ago • 2 comments

  • introduced 'Check Is Array' in the module.exports section to make sure that we receive an array
  • using pre built 'Array.forEach' to iterate over the first array
  • using pre build 'Array.findIndex' to fetch the index for the item to be check for in the diff array

sricharankrishnan avatar Jan 04 '22 11:01 sricharankrishnan

Hello Jon.

Here is another suggestion from my side on how this could be redone. Let me know your thoughts on this. Cheers!

sricharankrishnan avatar Jan 04 '22 11:01 sricharankrishnan

  • introduced 'Check Is Array' in the module.exports section to make sure that we receive an array

I don't think this is worth it because whatever code is calling arr-diff should make sure to input arrays. This would slightly slow down performance when it is used correctly.

ChocolateLoverRaj avatar Apr 26 '22 15:04 ChocolateLoverRaj