Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@marcopeg/utils

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@marcopeg/utils - npm Package Compare versions

Comparing version 1.5.0 to 1.5.1

29

lib/pause.js
"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;

2

package.json
{
"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
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc