All files / es5 util.js

83.33% Statements 10/12
56.25% Branches 9/16
83.33% Functions 5/6
100% Lines 7/7
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26    10x     217x     10x 393x     10x 393x             10x          
"use strict";
 
function _typeof(obj) { Eif (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
 
function toArray(a) {
  return Array.isArray(a) ? a : [a];
}
 
var isPromise = function isPromise(v) {
  return v && v.then;
};
 
var toPromise = function toPromise(v) {
  return isPromise(v) ? v : Promise.resolve(v);
}; // istanbul ignore next
 
 
var delay = (typeof setImmediate === "undefined" ? "undefined" : _typeof(setImmediate)) === undefined ? function (fn) {
  return setTimeout(fn, 0);
} : setImmediate;
module.exports = {
  toArray: toArray,
  toPromise: toPromise,
  delay: delay
};
//# sourceMappingURL=util.js.map