@marcopeg/utils
Advanced tools
Comparing version 1.5.0 to 1.5.1
"use strict"; | ||
function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; } | ||
var pause = function pause(time) { | ||
return new Promise(function (resolve) { | ||
return setTimeout(resolve, time); | ||
}); | ||
}; | ||
var pause = function () { | ||
var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(time) { | ||
return regeneratorRuntime.wrap(function _callee$(_context) { | ||
while (1) { | ||
switch (_context.prev = _context.next) { | ||
case 0: | ||
return _context.abrupt("return", new Promise(function (resolve) { | ||
return setTimeout(resolve, time); | ||
})); | ||
case 1: | ||
case "end": | ||
return _context.stop(); | ||
} | ||
} | ||
}, _callee, undefined); | ||
})); | ||
return function pause(_x) { | ||
return _ref.apply(this, arguments); | ||
}; | ||
}(); | ||
module.exports = pause; |
{ | ||
"name": "@marcopeg/utils", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"description": "Javascript utils for server and client projects", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
const pause = async time => | ||
const pause = time => | ||
new Promise(resolve => setTimeout(resolve, time)) | ||
module.exports = pause |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
72769
588