New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

p-promise

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

p-promise - npm Package Compare versions

Comparing version 0.0.13 to 0.0.14

5

p.js

@@ -324,4 +324,5 @@ ;(function( factory ){

P.allResolved = allResolved;
function allResolved( promises ) {
// P.allResolved is DEPRECATED!
P.allSettled = P.allResolved = allSettled;
function allSettled( promises ) {
var waiting = 1;

@@ -328,0 +329,0 @@ var def = defer();

2

p.min.js

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

(function(e){if(typeof module!=="undefined"&&module&&module.exports){module.exports=e()}else if(typeof define==="function"&&define.amd){define(e)}else{P=e()}})(function(){"use strict";var e={f:null,w:false,n:null},n=e,t=true,r=0,o=0,i,f,u=v(typeof window)&&window||v(typeof worker)&&worker,c=e.toString,l,s={};function a(){--r;if(e.n){if(!r&&e.n.n){++r;f(a,0)}do{e=e.n;if(e.w){--o}var n=e.f;e.f=null;n()}while(e.n)}t=true}function p(e,i){if(t&&++o>r){++r;f(a,0)}n=n.n={f:e,w:t,n:null};t=i===true}function v(e){return e==="object"||e==="function"}function m(e){return e==="function"}if(v(typeof process)&&process&&m(typeof process.nextTick)){f=process.nextTick}else if(u&&m(typeof u.setImmediate)){f=function(e){u.setImmediate(e)}}else if(m(typeof MessageChannel)){i=new MessageChannel;i.port1.onmessage=a;f=function(){i.port2.postMessage(0)}}else{f=setTimeout;if(u&&v(typeof Image)&&Image){(function(){var e=0;var n=function(e){var n=new Image;n.onerror=e;n.src="data:image/png,"};try{n(function(){if(--e===0){f=n}});++e}catch(t){}e&&setTimeout(function(){e=0},0)})()}}l=Array.isArray||function(e){return!!e&&c.call(e)==="[object Array]"};function d(e,n){for(var t=0,r=e.length;t<r;++t){if(t in e){n(e[t],t)}}}function h(e,n){if(l(e)){d(e,n);return}for(var t in e){n(e[t],t)}}function y(e){if(e instanceof g){return e}var n=w();n.resolve(e);return n.promise}y.defer=w;function w(){var e=[],n=false,t=new g(o),r;function o(t,o,i,f){var u=i===s?void 0:w();function c(){var e=n?o:t;if(!u){e&&e(r);return}if(typeof e==="function"){try{var i=e(r)}catch(f){u.reject(f);return}u.resolve(i)}else if(n){u.reject(r)}else{u.fulfill(r)}}if(e){e.push(c)}else if(!u&&f){c()}else{p(c)}return u&&u.promise}function i(n){if(e){if(n instanceof g){n.then(f,u,s,true)}else if(n&&typeof n.then==="function"){p(function(){try{n.then(f,u)}catch(e){u(e)}})}else{f(n)}}}function f(o){if(e){t.state=n?"rejected":"fulfilled";t.value=r=o;d(e,p);e=null}}function u(t){if(e){n=true;f(t)}}return{promise:t,resolve:i,fulfill:f,reject:u}}function g(e){this.then=e;this.state="pending";this.value=void 0}g.prototype.done=function(e,n){var t=this;if(e||n){t=t.then(e,n)}t.then(null,function(e){p(function(){if(y.onerror){y.onerror(e)}else{throw e}},true)},s)};g.prototype.spread=function(e,n){return this.then(e&&function(n){return e.apply(void 0,n)},n)};g.prototype.timeout=function(e){var n=w();var t=setTimeout(function(){n.reject(new Error("Timed out after "+e+" ms"))},e);this.when(function(e){clearTimeout(t);n.fulfill(e)},function(e){clearTimeout(t);n.reject(e)},s,true);return n.promise};g.prototype.delay=function(e){var n=this;var t=w();setTimeout(function(){t.resolve(n)},e);return t.promise};y.all=T;function T(e){var n=0;var t=w();h(e,function(r,o){++n;y(r).then(function(r){e[o]=r;if(--n===0){t.fulfill(e)}},t.reject,s)});if(n===0){t.fulfill(e)}return t.promise}y.allResolved=j;function j(e){var n=1;var t=w();function r(){if(--n===0){t.fulfill(e)}}h(e,function(t,o){++n;e[o]=t=y(t);t.then(r,r,s)});r();return t.promise}y.onerror=null;y.prototype=g.prototype;y.nextTick=function(e){p(e,true)};y.ALT=s;y._each=h;return y});
(function(e){if(typeof module!=="undefined"&&module&&module.exports){module.exports=e()}else if(typeof define==="function"&&define.amd){define(e)}else{P=e()}})(function(){"use strict";var e={f:null,w:false,n:null},n=e,t=true,r=0,o=0,i,f,u=v(typeof window)&&window||v(typeof worker)&&worker,c=e.toString,l,s={};function a(){--r;if(e.n){if(!r&&e.n.n){++r;f(a,0)}do{e=e.n;if(e.w){--o}var n=e.f;e.f=null;n()}while(e.n)}t=true}function p(e,i){if(t&&++o>r){++r;f(a,0)}n=n.n={f:e,w:t,n:null};t=i===true}function v(e){return e==="object"||e==="function"}function m(e){return e==="function"}if(v(typeof process)&&process&&m(typeof process.nextTick)){f=process.nextTick}else if(u&&m(typeof u.setImmediate)){f=function(e){u.setImmediate(e)}}else if(m(typeof MessageChannel)){i=new MessageChannel;i.port1.onmessage=a;f=function(){i.port2.postMessage(0)}}else{f=setTimeout;if(u&&v(typeof Image)&&Image){(function(){var e=0;var n=function(e){var n=new Image;n.onerror=e;n.src="data:image/png,"};try{n(function(){if(--e===0){f=n}});++e}catch(t){}e&&setTimeout(function(){e=0},0)})()}}l=Array.isArray||function(e){return!!e&&c.call(e)==="[object Array]"};function d(e,n){for(var t=0,r=e.length;t<r;++t){if(t in e){n(e[t],t)}}}function h(e,n){if(l(e)){d(e,n);return}for(var t in e){n(e[t],t)}}function y(e){if(e instanceof g){return e}var n=w();n.resolve(e);return n.promise}y.defer=w;function w(){var e=[],n=false,t=new g(o),r;function o(t,o,i,f){var u=i===s?void 0:w();function c(){var e=n?o:t;if(!u){e&&e(r);return}if(typeof e==="function"){try{var i=e(r)}catch(f){u.reject(f);return}u.resolve(i)}else if(n){u.reject(r)}else{u.fulfill(r)}}if(e){e.push(c)}else if(!u&&f){c()}else{p(c)}return u&&u.promise}function i(n){if(e){if(n instanceof g){n.then(f,u,s,true)}else if(n&&typeof n.then==="function"){p(function(){try{n.then(f,u)}catch(e){u(e)}})}else{f(n)}}}function f(o){if(e){t.state=n?"rejected":"fulfilled";t.value=r=o;d(e,p);e=null}}function u(t){if(e){n=true;f(t)}}return{promise:t,resolve:i,fulfill:f,reject:u}}function g(e){this.then=e;this.state="pending";this.value=void 0}g.prototype.done=function(e,n){var t=this;if(e||n){t=t.then(e,n)}t.then(null,function(e){p(function(){if(y.onerror){y.onerror(e)}else{throw e}},true)},s)};g.prototype.spread=function(e,n){return this.then(e&&function(n){return e.apply(void 0,n)},n)};g.prototype.timeout=function(e){var n=w();var t=setTimeout(function(){n.reject(new Error("Timed out after "+e+" ms"))},e);this.when(function(e){clearTimeout(t);n.fulfill(e)},function(e){clearTimeout(t);n.reject(e)},s,true);return n.promise};g.prototype.delay=function(e){var n=this;var t=w();setTimeout(function(){t.resolve(n)},e);return t.promise};y.all=T;function T(e){var n=0;var t=w();h(e,function(r,o){++n;y(r).then(function(r){e[o]=r;if(--n===0){t.fulfill(e)}},t.reject,s)});if(n===0){t.fulfill(e)}return t.promise}y.allSettled=y.allResolved=j;function j(e){var n=1;var t=w();function r(){if(--n===0){t.fulfill(e)}}h(e,function(t,o){++n;e[o]=t=y(t);t.then(r,r,s)});r();return t.promise}y.onerror=null;y.prototype=g.prototype;y.nextTick=function(e){p(e,true)};y.ALT=s;y._each=h;return y});
{
"name": "p-promise",
"version": "0.0.13",
"version": "0.0.14",
"description": "A simple Promises/A+ library.",

@@ -5,0 +5,0 @@ "author": "Robert Katić <robert.katic@gmail.com> (https://github.com/rkatic)",

@@ -19,3 +19,4 @@ [![Build Status](https://secure.travis-ci.org/rkatic/p.png)](http://travis-ci.org/rkatic/p)

- `P.all(promises)` (array **or object** of promises)
- `P.allResolved(promises)` (array **or object** of promises)
- `P.allSettled(promises)` (array **or object** of promises)
- `P.allResolved(promises)` **DEPRECATED - use P.allSettled instead**
- `P.onerror`

@@ -22,0 +23,0 @@ - `P.nextTick(callback)`

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