All files util.js

87.5% Statements 7/8
62.5% Branches 5/8
75% Functions 3/4
100% Lines 5/5
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  2x     4x 4x     1x   1x          
function toArray(a) {
  return Array.isArray(a) ? a : [a];
}
 
const isPromise = v => v && v.then;
const toPromise = v => (isPromise(v) ? v : Promise.resolve(v));
 
const delay =
  typeof setImmediate === undefined ? fn => setTimeout(fn, 0) : setImmediate;
 
module.exports = {
  toArray,
  toPromise,
  delay
};