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

@peersyst/react-utils

Package Overview
Dependencies
Maintainers
1
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@peersyst/react-utils - npm Package Compare versions

Comparing version 2.2.1 to 2.2.2

14

esm/timeoutPromise.js

@@ -16,3 +16,3 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";

_classCallCheck(this, TimeoutPromiseError);
return _super.call(this, "Promise timed out");
return _super.call(this, "Promise timeout");
}

@@ -26,3 +26,3 @@ return _createClass(TimeoutPromiseError);

_timeoutPromise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(promise, ms) {
var timeout, res;
var timeout, rejectedPromise, res;
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -32,7 +32,9 @@ while (1) {

case 0:
timeout = setTimeout(function () {
Promise.reject(new TimeoutPromiseError());
}, ms);
rejectedPromise = new Promise(function (_, reject) {
timeout = setTimeout(function () {
reject(new TimeoutPromiseError());
}, ms);
});
_context.next = 3;
return promise;
return Promise.race([promise, rejectedPromise]);
case 3:

@@ -39,0 +41,0 @@ res = _context.sent;

@@ -16,3 +16,3 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";

_classCallCheck(this, TimeoutPromiseError);
return _super.call(this, "Promise timed out");
return _super.call(this, "Promise timeout");
}

@@ -26,3 +26,3 @@ return _createClass(TimeoutPromiseError);

_timeoutPromise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(promise, ms) {
var timeout, res;
var timeout, rejectedPromise, res;
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -32,7 +32,9 @@ while (1) {

case 0:
timeout = setTimeout(function () {
Promise.reject(new TimeoutPromiseError());
}, ms);
rejectedPromise = new Promise(function (_, reject) {
timeout = setTimeout(function () {
reject(new TimeoutPromiseError());
}, ms);
});
_context.next = 3;
return promise;
return Promise.race([promise, rejectedPromise]);
case 3:

@@ -39,0 +41,0 @@ res = _context.sent;

@@ -16,3 +16,3 @@ import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";

_classCallCheck(this, TimeoutPromiseError);
return _super.call(this, "Promise timed out");
return _super.call(this, "Promise timeout");
}

@@ -26,3 +26,3 @@ return _createClass(TimeoutPromiseError);

_timeoutPromise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(promise, ms) {
var timeout, res;
var timeout, rejectedPromise, res;
return _regeneratorRuntime.wrap(function _callee$(_context) {

@@ -32,7 +32,9 @@ while (1) {

case 0:
timeout = setTimeout(function () {
Promise.reject(new TimeoutPromiseError());
}, ms);
rejectedPromise = new Promise(function (_, reject) {
timeout = setTimeout(function () {
reject(new TimeoutPromiseError());
}, ms);
});
_context.next = 3;
return promise;
return Promise.race([promise, rejectedPromise]);
case 3:

@@ -39,0 +41,0 @@ res = _context.sent;

@@ -24,3 +24,3 @@ "use strict";

(0, _classCallCheck2["default"])(this, TimeoutPromiseError);
return _super.call(this, "Promise timed out");
return _super.call(this, "Promise timeout");
}

@@ -35,3 +35,3 @@ return (0, _createClass2["default"])(TimeoutPromiseError);

_timeoutPromise = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee(promise, ms) {
var timeout, res;
var timeout, rejectedPromise, res;
return _regenerator["default"].wrap(function _callee$(_context) {

@@ -41,7 +41,9 @@ while (1) {

case 0:
timeout = setTimeout(function () {
Promise.reject(new TimeoutPromiseError());
}, ms);
rejectedPromise = new Promise(function (_, reject) {
timeout = setTimeout(function () {
reject(new TimeoutPromiseError());
}, ms);
});
_context.next = 3;
return promise;
return Promise.race([promise, rejectedPromise]);
case 3:

@@ -48,0 +50,0 @@ res = _context.sent;

{
"name": "@peersyst/react-utils",
"author": "Peersyst",
"version": "2.2.1",
"version": "2.2.2",
"license": "MIT",

@@ -6,0 +6,0 @@ "main": "./node/index.js",

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