import scriptjs from 'scriptjs';
const LIBS = ['url/to/main/lib.js', 'url/to/dep/lib.js'];
scriptjs.order(LIBS, () => done());
scriptjs.order(LIBS, () => done());
The second one will throw an error because LIBS will be mutated with the .shift() and will be empty.
The second one will throw an error because
LIBSwill be mutated with the.shift()and will be empty.