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

stack-promises

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stack-promises - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

2

dist/index.umd.js

@@ -1,2 +0,2 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("sequent-promises")):"function"==typeof define&&define.amd?define(["exports","sequent-promises"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sipConnector={},e.sequentPromisesList)}(this,(function(e,t){"use strict";const s=new Error("Stack is empty"),r=new Error("Promise is not actual"),n=new Error("stackPromises only works with functions that returns a Promise");e.default=()=>{const e=[],o=[],i=({task:e,index:t})=>()=>{let s=(({task:e,index:t})=>{const s=o.find((({task:s,index:r})=>e===s&&t===r));if(s)return s.promise})({task:e,index:t});return s||(s=e(),(({task:e,promise:t,index:s})=>{o.push({task:e,promise:t,index:s})})({promise:s,task:e,index:t})),s};let c=!1;const u=()=>c,l=()=>(c=!0,t(e,u)),a=()=>0===e.length?Promise.reject(s):new Promise(((t,s)=>{const n=(({resolve:t,reject:s})=>({results:n,isSuccessful:o})=>{if(n.length===e.length){const e=n[n.length-1];o?t(e):s(e)}else s(r)})({resolve:t,reject:s});l().then(n).catch(n)}));return a.add=t=>{if("function"!=typeof t)throw n;const s=e.length;return e.push(i({task:t,index:s})),a},a.stop=()=>{c=!1,e.length=0,o.length=0},a},e.isEmptyStackError=e=>e===s,e.isPromiseIsNotActualError=e=>e===r,e.promiseIsNotActualError=r,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("sequent-promises")):"function"==typeof define&&define.amd?define(["exports","sequent-promises"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).sipConnector={},e.sequentPromisesList)}(this,(function(e,t){"use strict";function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=s(t);const r=new Error("Stack is empty"),o=new Error("Promise is not actual"),i=new Error("stackPromises only works with functions that returns a Promise");e.default=()=>{const e=[],t=[],s=({task:e,index:s})=>()=>{let n=(({task:e,index:s})=>{const n=t.find((({task:t,index:n})=>e===t&&s===n));if(n)return n.promise})({task:e,index:s});return n||(n=e(),(({task:e,promise:s,index:n})=>{t.push({task:e,promise:s,index:n})})({promise:n,task:e,index:s})),n};let u=!1;const c=()=>u,l=()=>(u=!0,n.default(e,c)),a=()=>0===e.length?Promise.reject(r):new Promise(((t,s)=>{const n=(({resolve:t,reject:s})=>({results:n,isSuccessful:r})=>{if(n.length===e.length){const e=n[n.length-1];r?t(e):s(e)}else s(o)})({resolve:t,reject:s});l().then(n).catch(n)}));return a.add=t=>{if("function"!=typeof t)throw i;const n=e.length;return e.push(s({task:t,index:n})),a},a.stop=()=>{u=!1,e.length=0,t.length=0},a},e.isEmptyStackError=e=>e===r,e.isPromiseIsNotActualError=e=>e===o,e.promiseIsNotActualError=o,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.js.map
{
"name": "stack-promises",
"version": "0.0.9",
"version": "0.0.10",
"description": "sequentPromises resolves Promises sequentially",

@@ -46,4 +46,4 @@ "keywords": [

"@commitlint/config-conventional": "^17.1.0",
"@rollup/plugin-commonjs": "^23.0.0",
"@rollup/plugin-node-resolve": "^15.0.0",
"@rollup/plugin-commonjs": "^21.0.1",
"@rollup/plugin-node-resolve": "^13.1.3",
"@types/jest": "^29.1.2",

@@ -65,5 +65,5 @@ "@types/node": "^18.8.5",

"promise-delay": "^2.1.0",
"rollup": "^3.1.0",
"rollup": "^2.64.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-typescript2": "0.34.1",
"rollup-plugin-typescript2": "0.31.1",
"standard-version": "^9.5.0",

@@ -70,0 +70,0 @@ "ts-jest": "^29.0.3",

Sorry, the diff of this file is not supported yet

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