Skip to content

Conversation

sricharankrishnan
Copy link

  • 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

- 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
Copy link
Author

Hello Jon.

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

@ChocolateLoverRaj
Copy link

  • 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants