node-robocopy
node-robocopy copied to clipboard
Use Array.isArray() instead of instanceof Array to handle arrays.
To detect correctly arrays, Array.isArray() should be preferred to instanceof Array. This improvement would allow node-robocopy to work correctly in more complex situations, such as when embedded in a Electron or NW.JS application.
This is explained by inaccurate results of instanceof Array when it is used across different context:
However, since instanceof Array doesn't work correctly across iframes/window, Array.isArray() would be more robust solution.