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.1.0 to 0.1.1

4

p.js

@@ -219,4 +219,6 @@ ;(function( factory ){

pending = null;
return;
}
} else if ( x instanceof Promise ) {
if ( x instanceof Promise ) {
x.then( fulfill, reject, ALT, true );

@@ -223,0 +225,0 @@ return;

@@ -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,s,a={};function l(){--r;if(e.n){if(!r&&e.n.n){++r;f(l,0)}do{e=e.n;if(e.w){--o}var n=e.f;e.f=null;n()}while(e.n)}t=true}var p=function(e,i){if(t&&++o>r){++r;f(l,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)){p=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=l;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)})()}}function y(e){p(function(){if(w.onerror){w.onerror(e)}else{throw e}},true)}s=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(s(e)){d(e,n);return}for(var t in e){n(e[t],t)}}function w(e){if(e instanceof T){return e}var n=g();n.resolve(e);return n.promise}w.defer=g;function g(){var e=[],n=false,t;function r(r,o,i,f){var u=i===a?void 0:g();function c(){var e=n?r:o;if(typeof e==="function"){try{var i=e(t)}catch(f){u?u.reject(f):y(f);return}u&&u.resolve(i)}else if(u){u.resolve(t,a,n)}else if(!n){y(t)}}if(e){e.push(c)}else if(!u&&f){c()}else{p(c)}return u&&u.promise}function o(r,u,c){if(e){if(u===a){n=!!c;t=r;d(e,p);e=null}else if(r instanceof T){r.then(i,f,a,true);return}var s,l=typeof r;if(l==="object"&&r!==null||l==="function"){try{s=r.then;if(typeof s==="function"){s.call(r,o,f);return}}catch(v){f(v);return}}i(r)}}function i(e){o(e,a,true)}function f(e){o(e,a,false)}return{promise:new T(r),resolve:o,reject:f}}function T(e){this.then=e}T.prototype.done=function(e,n){this.then(e,n,a)};T.prototype.spread=function(e,n){return this.then(e&&function(n){return e.apply(void 0,n)},n)};T.prototype.timeout=function(e){var n=g();var t=setTimeout(function(){n.reject(new Error("Timed out after "+e+" ms"))},e);this.then(function(e){clearTimeout(t);n.resolve(e)},function(e){clearTimeout(t);n.reject(e)},a,true);return n.promise};T.prototype.delay=function(e){var n=this;var t=g();setTimeout(function(){t.resolve(n)},e);return t.promise};w.all=j;function j(e){var n=0;var t=g();h(e,function(r,o){++n;w(r).then(function(r){e[o]=r;if(--n===0){t.resolve(e)}},t.reject,a)});if(n===0){t.resolve(e)}return t.promise}w.onerror=null;w.prototype=T.prototype;w.nextTick=function(e){p(e,true)};w._each=h;return w});
(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,s,a={};function l(){--r;if(e.n){if(!r&&e.n.n){++r;f(l,0)}do{e=e.n;if(e.w){--o}var n=e.f;e.f=null;n()}while(e.n)}t=true}var p=function(e,i){if(t&&++o>r){++r;f(l,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)){p=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=l;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)})()}}function y(e){p(function(){if(w.onerror){w.onerror(e)}else{throw e}},true)}s=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(s(e)){d(e,n);return}for(var t in e){n(e[t],t)}}function w(e){if(e instanceof T){return e}var n=g();n.resolve(e);return n.promise}w.defer=g;function g(){var e=[],n=false,t;function r(r,o,i,f){var u=i===a?void 0:g();function c(){var e=n?r:o;if(typeof e==="function"){try{var i=e(t)}catch(f){u?u.reject(f):y(f);return}u&&u.resolve(i)}else if(u){u.resolve(t,a,n)}else if(!n){y(t)}}if(e){e.push(c)}else if(!u&&f){c()}else{p(c)}return u&&u.promise}function o(r,u,c){if(e){if(u===a){n=!!c;t=r;d(e,p);e=null;return}if(r instanceof T){r.then(i,f,a,true);return}var s,l=typeof r;if(l==="object"&&r!==null||l==="function"){try{s=r.then;if(typeof s==="function"){s.call(r,o,f);return}}catch(v){f(v);return}}i(r)}}function i(e){o(e,a,true)}function f(e){o(e,a,false)}return{promise:new T(r),resolve:o,reject:f}}function T(e){this.then=e}T.prototype.done=function(e,n){this.then(e,n,a)};T.prototype.spread=function(e,n){return this.then(e&&function(n){return e.apply(void 0,n)},n)};T.prototype.timeout=function(e){var n=g();var t=setTimeout(function(){n.reject(new Error("Timed out after "+e+" ms"))},e);this.then(function(e){clearTimeout(t);n.resolve(e)},function(e){clearTimeout(t);n.reject(e)},a,true);return n.promise};T.prototype.delay=function(e){var n=this;var t=g();setTimeout(function(){t.resolve(n)},e);return t.promise};w.all=j;function j(e){var n=0;var t=g();h(e,function(r,o){++n;w(r).then(function(r){e[o]=r;if(--n===0){t.resolve(e)}},t.reject,a)});if(n===0){t.resolve(e)}return t.promise}w.onerror=null;w.prototype=T.prototype;w.nextTick=function(e){p(e,true)};w._each=h;return w});
{
"name": "p-promise",
"version": "0.1.0",
"version": "0.1.1",
"description": "A simple Promises/A+ library.",

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

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