arr-diff
arr-diff copied to clipboard
[New Feature]: Suggestions
- 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
Hello Jon.
Here is another suggestion from my side on how this could be redone. Let me know your thoughts on this. Cheers!
- 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.