atomic-promise
Advanced tools
Comparing version 0.0.10 to 0.0.11
@@ -1,2 +0,2 @@ | ||
/*! atomic-promise v0.0.10 https://github.com/falsandtru/atomic-promise | (c) 2018, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
/*! atomic-promise v0.0.11 https://github.com/falsandtru/atomic-promise | (c) 2018, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
require = function () { | ||
@@ -90,7 +90,19 @@ function r(e, n, t) { | ||
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.noop = void 0; | ||
function noop() { | ||
} | ||
exports.noop = noop; | ||
}, | ||
{} | ||
], | ||
6: [ | ||
function (_dereq_, module, exports) { | ||
'use strict'; | ||
var _a, _b; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
exports.isPromiseLike = exports.Internal = exports.AtomicPromise = void 0; | ||
exports.never = exports.isPromiseLike = exports.Internal = exports.AtomicPromise = void 0; | ||
const global_1 = _dereq_('./global'); | ||
const alias_1 = _dereq_('./alias'); | ||
const noop_1 = _dereq_('./noop'); | ||
const internal = Symbol.for('spica/promise::internal'); | ||
@@ -112,4 +124,4 @@ class AtomicPromise { | ||
return new AtomicPromise((resolve, reject) => { | ||
const values = alias_1.isArray(vs) ? vs : [...vs]; | ||
const results = global_1.Array(values.length); | ||
const values = (0, alias_1.isArray)(vs) ? vs : [...vs]; | ||
const results = (0, global_1.Array)(values.length); | ||
let count = 0; | ||
@@ -150,3 +162,3 @@ for (let i = 0; i < values.length; ++i) { | ||
return new AtomicPromise((resolve, reject) => { | ||
const values = alias_1.isArray(vs) ? vs : [...vs]; | ||
const values = (0, alias_1.isArray)(vs) ? vs : [...vs]; | ||
for (let i = 0; i < values.length; ++i) { | ||
@@ -184,4 +196,4 @@ const value = values[i]; | ||
return new AtomicPromise(resolve => { | ||
const values = alias_1.isArray(vs) ? vs : [...vs]; | ||
const results = global_1.Array(values.length); | ||
const values = (0, alias_1.isArray)(vs) ? vs : [...vs]; | ||
const results = (0, global_1.Array)(values.length); | ||
let count = 0; | ||
@@ -315,9 +327,9 @@ for (let i = 0; i < values.length; ++i) { | ||
case 2: | ||
if (fulfillReactions.length > 0) | ||
if (fulfillReactions.length !== 0) | ||
break; | ||
return this.call(resolve, reject, resolve, onfulfilled, status.value); | ||
return call(resolve, reject, resolve, onfulfilled, status.value); | ||
case 3: | ||
if (rejectReactions.length > 0) | ||
if (rejectReactions.length !== 0) | ||
break; | ||
return this.call(resolve, reject, reject, onrejected, status.reason); | ||
return call(resolve, reject, reject, onrejected, status.reason); | ||
} | ||
@@ -344,3 +356,3 @@ fulfillReactions.push([ | ||
case 2: | ||
if (rejectReactions.length > 0) { | ||
if (rejectReactions.length !== 0) { | ||
this.rejectReactions = []; | ||
@@ -350,7 +362,7 @@ } | ||
return; | ||
this.react(fulfillReactions, status.value); | ||
react(fulfillReactions, status.value); | ||
this.fulfillReactions = []; | ||
return; | ||
case 3: | ||
if (fulfillReactions.length > 0) { | ||
if (fulfillReactions.length !== 0) { | ||
this.fulfillReactions = []; | ||
@@ -360,3 +372,3 @@ } | ||
return; | ||
this.react(rejectReactions, status.reason); | ||
react(rejectReactions, status.reason); | ||
this.rejectReactions = []; | ||
@@ -366,19 +378,19 @@ return; | ||
} | ||
react(reactions, param) { | ||
for (let i = 0; i < reactions.length; ++i) { | ||
const reaction = reactions[i]; | ||
this.call(reaction[0], reaction[1], reaction[2], reaction[3], param); | ||
} | ||
} | ||
exports.Internal = Internal; | ||
function react(reactions, param) { | ||
for (let i = 0; i < reactions.length; ++i) { | ||
const reaction = reactions[i]; | ||
call(reaction[0], reaction[1], reaction[2], reaction[3], param); | ||
} | ||
call(resolve, reject, cont, callback, param) { | ||
if (!callback) | ||
return cont(param); | ||
try { | ||
resolve(callback(param)); | ||
} catch (reason) { | ||
reject(reason); | ||
} | ||
} | ||
function call(resolve, reject, cont, callback, param) { | ||
if (!callback) | ||
return cont(param); | ||
try { | ||
resolve(callback(param)); | ||
} catch (reason) { | ||
reject(reason); | ||
} | ||
} | ||
exports.Internal = Internal; | ||
function isPromiseLike(value) { | ||
@@ -391,6 +403,24 @@ return value !== null && typeof value === 'object' && typeof value.then === 'function'; | ||
} | ||
exports.never = new class Never extends Promise { | ||
static get [Symbol.species]() { | ||
return Never; | ||
} | ||
constructor() { | ||
super(noop_1.noop); | ||
} | ||
then() { | ||
return this; | ||
} | ||
catch() { | ||
return this; | ||
} | ||
finally() { | ||
return this; | ||
} | ||
}(); | ||
}, | ||
{ | ||
'./alias': 3, | ||
'./global': 4 | ||
'./global': 4, | ||
'./noop': 5 | ||
} | ||
@@ -423,3 +453,3 @@ ], | ||
}, | ||
{ 'spica/promise': 5 } | ||
{ 'spica/promise': 6 } | ||
] | ||
@@ -437,3 +467,3 @@ }, {}, [ | ||
} else { | ||
Object.assign(root, factory()); | ||
root.returnExports = factory(); | ||
} | ||
@@ -440,0 +470,0 @@ }(typeof self !== 'undefined' ? self : this, function () { |
@@ -1,2 +0,2 @@ | ||
/*! atomic-promise v0.0.10 https://github.com/falsandtru/atomic-promise | (c) 2018, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
require=function(){return function e(t,r,s){function n(o,a){if(!r[o]){if(!t[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(i)return i(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var u=r[o]={exports:{}};t[o][0].call(u.exports,function(e){return n(t[o][1][e]||e)},u,u.exports,e,t,r,s)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o<s.length;o++)n(s[o]);return n}}()({1:[function(e,t,r){},{}],2:[function(e,t,r){arguments[4][1][0].apply(r,arguments)},{dup:1}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArray=r.ObjectValues=r.ObjectSetPrototypeOf=r.ObjectSeal=r.ObjectPreventExtensions=r.ObjectKeys=r.isSealed=r.isFrozen=r.isExtensible=r.ObjectIs=r.ObjectGetPrototypeOf=r.ObjectGetOwnPropertySymbols=r.ObjectGetOwnPropertyNames=r.ObjectGetOwnPropertyDescriptors=r.ObjectGetOwnPropertyDescriptor=r.ObjectFromEntries=r.ObjectFreeze=r.ObjectEntries=r.ObjectDefineProperty=r.ObjectDefineProperties=r.ObjectCreate=r.ObjectAssign=r.toString=r.isEnumerable=r.isPrototypeOf=r.hasOwnProperty=r.SymbolKeyFor=r.SymbolFor=r.sign=r.round=r.random=r.min=r.max=r.floor=r.ceil=r.abs=r.parseInt=r.parseFloat=r.isSafeInteger=r.isNaN=r.isInteger=r.isFinite=r.NaN=void 0,r.NaN=Number.NaN,r.isFinite=Number.isFinite,r.isInteger=Number.isInteger,r.isNaN=Number.isNaN,r.isSafeInteger=Number.isSafeInteger,r.parseFloat=Number.parseFloat,r.parseInt=Number.parseInt,r.abs=Math.abs,r.ceil=Math.ceil,r.floor=Math.floor,r.max=Math.max,r.min=Math.min,r.random=Math.random,r.round=Math.round,r.sign=Math.sign,r.SymbolFor=Symbol.for,r.SymbolKeyFor=Symbol.keyFor,r.hasOwnProperty=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty),r.isPrototypeOf=Object.prototype.isPrototypeOf.call.bind(Object.prototype.isPrototypeOf),r.isEnumerable=Object.prototype.propertyIsEnumerable.call.bind(Object.prototype.propertyIsEnumerable),r.toString=Object.prototype.toString.call.bind(Object.prototype.toString),r.ObjectAssign=Object.assign,r.ObjectCreate=Object.create,r.ObjectDefineProperties=Object.defineProperties,r.ObjectDefineProperty=Object.defineProperty,r.ObjectEntries=Object.entries,r.ObjectFreeze=Object.freeze,r.ObjectFromEntries=Object.fromEntries,r.ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,r.ObjectGetOwnPropertyDescriptors=Object.getOwnPropertyDescriptors,r.ObjectGetOwnPropertyNames=Object.getOwnPropertyNames,r.ObjectGetOwnPropertySymbols=Object.getOwnPropertySymbols,r.ObjectGetPrototypeOf=Object.getPrototypeOf,r.ObjectIs=Object.is,r.isExtensible=Object.isExtensible,r.isFrozen=Object.isFrozen,r.isSealed=Object.isSealed,r.ObjectKeys=Object.keys,r.ObjectPreventExtensions=Object.preventExtensions,r.ObjectSeal=Object.seal,r.ObjectSetPrototypeOf=Object.setPrototypeOf,r.ObjectValues=Object.values,r.isArray=Array.isArray},{}],4:[function(_dereq_,module,exports){"use strict";const global="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||Function("return this")();eval("global.global = global"),module.exports=global},{}],5:[function(e,t,r){"use strict";var s,n;Object.defineProperty(r,"__esModule",{value:!0}),r.isPromiseLike=r.Internal=r.AtomicPromise=void 0;const i=e("./global"),o=e("./alias"),a=Symbol.for("spica/promise::internal");class c{constructor(e){this[s]="Promise",this[n]=new l;try{e(e=>void this[a].resolve(e),e=>void this[a].reject(e))}catch(e){this[a].reject(e)}}static get[Symbol.species](){return c}static all(e){return new c((t,r)=>{const s=o.isArray(e)?e:[...e],n=i.Array(s.length);let c=0;for(let e=0;e<s.length;++e){const i=s[e];if(u(i)){if(b(i)){const{status:t}=i[a];switch(t.state){case 2:n[e]=t.value,++c;continue;case 3:r(t.reason),e=s.length;continue}}i.then(r=>{n[e]=r,++c===s.length&&t(n)},t=>{r(t),e=s.length})}else n[e]=i,++c}c===s.length&&t(n)})}static race(e){return new c((t,r)=>{const s=o.isArray(e)?e:[...e];for(let e=0;e<s.length;++e){const n=s[e];if(!u(n))return t(n);if(b(n)){const{status:e}=n[a];switch(e.state){case 2:return t(e.value);case 3:return r(e.reason)}}}let n=!1;for(let e=0;e<s.length;++e){if(s[e].then(e=>{t(e),n=!0},e=>{r(e),n=!0}),n)return}})}static allSettled(e){return new c(t=>{const r=o.isArray(e)?e:[...e],s=i.Array(r.length);let n=0;for(let e=0;e<r.length;++e){const i=r[e];if(u(i)){if(b(i)){const{status:t}=i[a];switch(t.state){case 2:s[e]={status:"fulfilled",value:t.value},++n;continue;case 3:s[e]={status:"rejected",reason:t.reason},++n;continue}}i.then(i=>{s[e]={status:"fulfilled",value:i},++n===r.length&&t(s)},i=>{s[e]={status:"rejected",reason:i},++n===r.length&&t(s)})}else s[e]={status:"fulfilled",value:i},++n}n===r.length&&t(s)})}static resolve(e){return new c(t=>t(e))}static reject(e){return new c((t,r)=>r(e))}then(e,t){return new c((r,s)=>this[a].then(r,s,e,t))}catch(e){return this.then(void 0,e)}finally(e){return this.then(e,e).then(()=>this)}}r.AtomicPromise=c,s=Symbol.toStringTag,n=a;class l{constructor(){this.status={state:0},this.fulfillReactions=[],this.rejectReactions=[]}get isPending(){return 0===this.status.state}resolve(e){if(0===this.status.state){if(!u(e))return this.status={state:2,value:e},this.resume();if(b(e)){const t=e[a];switch(t.status.state){case 2:case 3:return this.status=t.status,this.resume();default:return t.then(()=>(this.status=t.status,this.resume()),()=>(this.status=t.status,this.resume()))}}this.status={state:1,promise:e},e.then(e=>{this.status={state:2,value:e},this.resume()},e=>{this.status={state:3,reason:e},this.resume()})}}reject(e){if(0===this.status.state)return this.status={state:3,reason:e},this.resume()}then(e,t,r,s){const{status:n,fulfillReactions:i,rejectReactions:o}=this;switch(n.state){case 2:if(i.length>0)break;return this.call(e,t,e,r,n.value);case 3:if(o.length>0)break;return this.call(e,t,t,s,n.reason)}i.push([e,t,e,r]),o.push([e,t,t,s])}resume(){const{status:e,fulfillReactions:t,rejectReactions:r}=this;switch(e.state){case 0:case 1:return;case 2:if(r.length>0&&(this.rejectReactions=[]),0===t.length)return;return this.react(t,e.value),void(this.fulfillReactions=[]);case 3:if(t.length>0&&(this.fulfillReactions=[]),0===r.length)return;return this.react(r,e.reason),void(this.rejectReactions=[])}}react(e,t){for(let r=0;r<e.length;++r){const s=e[r];this.call(s[0],s[1],s[2],s[3],t)}}call(e,t,r,s,n){if(!s)return r(n);try{e(s(n))}catch(e){t(e)}}}function u(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}function b(e){return a in e}r.Internal=l,r.isPromiseLike=u},{"./alias":3,"./global":4}],"atomic-promise":[function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("spica/promise"),r)},{"spica/promise":5}]},{},[1,2,"atomic-promise"]),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():Object.assign(e,t())}("undefined"!=typeof self?self:this,function(){return require("atomic-promise")}); | ||
/*! atomic-promise v0.0.11 https://github.com/falsandtru/atomic-promise | (c) 2018, falsandtru | (Apache-2.0 AND MPL-2.0) License */ | ||
require=function(){return function e(t,r,s){function n(o,a){if(!r[o]){if(!t[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(i)return i(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var l=r[o]={exports:{}};t[o][0].call(l.exports,function(e){return n(t[o][1][e]||e)},l,l.exports,e,t,r,s)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o<s.length;o++)n(s[o]);return n}}()({1:[function(e,t,r){},{}],2:[function(e,t,r){arguments[4][1][0].apply(r,arguments)},{dup:1}],3:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isArray=r.ObjectValues=r.ObjectSetPrototypeOf=r.ObjectSeal=r.ObjectPreventExtensions=r.ObjectKeys=r.isSealed=r.isFrozen=r.isExtensible=r.ObjectIs=r.ObjectGetPrototypeOf=r.ObjectGetOwnPropertySymbols=r.ObjectGetOwnPropertyNames=r.ObjectGetOwnPropertyDescriptors=r.ObjectGetOwnPropertyDescriptor=r.ObjectFromEntries=r.ObjectFreeze=r.ObjectEntries=r.ObjectDefineProperty=r.ObjectDefineProperties=r.ObjectCreate=r.ObjectAssign=r.toString=r.isEnumerable=r.isPrototypeOf=r.hasOwnProperty=r.SymbolKeyFor=r.SymbolFor=r.sign=r.round=r.random=r.min=r.max=r.floor=r.ceil=r.abs=r.parseInt=r.parseFloat=r.isSafeInteger=r.isNaN=r.isInteger=r.isFinite=r.NaN=void 0,r.NaN=Number.NaN,r.isFinite=Number.isFinite,r.isInteger=Number.isInteger,r.isNaN=Number.isNaN,r.isSafeInteger=Number.isSafeInteger,r.parseFloat=Number.parseFloat,r.parseInt=Number.parseInt,r.abs=Math.abs,r.ceil=Math.ceil,r.floor=Math.floor,r.max=Math.max,r.min=Math.min,r.random=Math.random,r.round=Math.round,r.sign=Math.sign,r.SymbolFor=Symbol.for,r.SymbolKeyFor=Symbol.keyFor,r.hasOwnProperty=Object.prototype.hasOwnProperty.call.bind(Object.prototype.hasOwnProperty),r.isPrototypeOf=Object.prototype.isPrototypeOf.call.bind(Object.prototype.isPrototypeOf),r.isEnumerable=Object.prototype.propertyIsEnumerable.call.bind(Object.prototype.propertyIsEnumerable),r.toString=Object.prototype.toString.call.bind(Object.prototype.toString),r.ObjectAssign=Object.assign,r.ObjectCreate=Object.create,r.ObjectDefineProperties=Object.defineProperties,r.ObjectDefineProperty=Object.defineProperty,r.ObjectEntries=Object.entries,r.ObjectFreeze=Object.freeze,r.ObjectFromEntries=Object.fromEntries,r.ObjectGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor,r.ObjectGetOwnPropertyDescriptors=Object.getOwnPropertyDescriptors,r.ObjectGetOwnPropertyNames=Object.getOwnPropertyNames,r.ObjectGetOwnPropertySymbols=Object.getOwnPropertySymbols,r.ObjectGetPrototypeOf=Object.getPrototypeOf,r.ObjectIs=Object.is,r.isExtensible=Object.isExtensible,r.isFrozen=Object.isFrozen,r.isSealed=Object.isSealed,r.ObjectKeys=Object.keys,r.ObjectPreventExtensions=Object.preventExtensions,r.ObjectSeal=Object.seal,r.ObjectSetPrototypeOf=Object.setPrototypeOf,r.ObjectValues=Object.values,r.isArray=Array.isArray},{}],4:[function(_dereq_,module,exports){"use strict";const global="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||Function("return this")();eval("global.global = global"),module.exports=global},{}],5:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.noop=void 0,r.noop=function(){}},{}],6:[function(e,t,r){"use strict";var s,n;Object.defineProperty(r,"__esModule",{value:!0}),r.never=r.isPromiseLike=r.Internal=r.AtomicPromise=void 0;const i=e("./global"),o=e("./alias"),a=e("./noop"),c=Symbol.for("spica/promise::internal");class u{constructor(e){this[s]="Promise",this[n]=new l;try{e(e=>void this[c].resolve(e),e=>void this[c].reject(e))}catch(e){this[c].reject(e)}}static get[Symbol.species](){return u}static all(e){return new u((t,r)=>{const s=(0,o.isArray)(e)?e:[...e],n=(0,i.Array)(s.length);let a=0;for(let e=0;e<s.length;++e){const i=s[e];if(p(i)){if(h(i)){const{status:t}=i[c];switch(t.state){case 2:n[e]=t.value,++a;continue;case 3:r(t.reason),e=s.length;continue}}i.then(r=>{n[e]=r,++a===s.length&&t(n)},t=>{r(t),e=s.length})}else n[e]=i,++a}a===s.length&&t(n)})}static race(e){return new u((t,r)=>{const s=(0,o.isArray)(e)?e:[...e];for(let e=0;e<s.length;++e){const n=s[e];if(!p(n))return t(n);if(h(n)){const{status:e}=n[c];switch(e.state){case 2:return t(e.value);case 3:return r(e.reason)}}}let n=!1;for(let e=0;e<s.length;++e){if(s[e].then(e=>{t(e),n=!0},e=>{r(e),n=!0}),n)return}})}static allSettled(e){return new u(t=>{const r=(0,o.isArray)(e)?e:[...e],s=(0,i.Array)(r.length);let n=0;for(let e=0;e<r.length;++e){const i=r[e];if(p(i)){if(h(i)){const{status:t}=i[c];switch(t.state){case 2:s[e]={status:"fulfilled",value:t.value},++n;continue;case 3:s[e]={status:"rejected",reason:t.reason},++n;continue}}i.then(i=>{s[e]={status:"fulfilled",value:i},++n===r.length&&t(s)},i=>{s[e]={status:"rejected",reason:i},++n===r.length&&t(s)})}else s[e]={status:"fulfilled",value:i},++n}n===r.length&&t(s)})}static resolve(e){return new u(t=>t(e))}static reject(e){return new u((t,r)=>r(e))}then(e,t){return new u((r,s)=>this[c].then(r,s,e,t))}catch(e){return this.then(void 0,e)}finally(e){return this.then(e,e).then(()=>this)}}r.AtomicPromise=u,s=Symbol.toStringTag,n=c;class l{constructor(){this.status={state:0},this.fulfillReactions=[],this.rejectReactions=[]}get isPending(){return 0===this.status.state}resolve(e){if(0===this.status.state){if(!p(e))return this.status={state:2,value:e},this.resume();if(h(e)){const t=e[c];switch(t.status.state){case 2:case 3:return this.status=t.status,this.resume();default:return t.then(()=>(this.status=t.status,this.resume()),()=>(this.status=t.status,this.resume()))}}this.status={state:1,promise:e},e.then(e=>{this.status={state:2,value:e},this.resume()},e=>{this.status={state:3,reason:e},this.resume()})}}reject(e){if(0===this.status.state)return this.status={state:3,reason:e},this.resume()}then(e,t,r,s){const{status:n,fulfillReactions:i,rejectReactions:o}=this;switch(n.state){case 2:if(0!==i.length)break;return b(e,t,e,r,n.value);case 3:if(0!==o.length)break;return b(e,t,t,s,n.reason)}i.push([e,t,e,r]),o.push([e,t,t,s])}resume(){const{status:e,fulfillReactions:t,rejectReactions:r}=this;switch(e.state){case 0:case 1:return;case 2:if(0!==r.length&&(this.rejectReactions=[]),0===t.length)return;return f(t,e.value),void(this.fulfillReactions=[]);case 3:if(0!==t.length&&(this.fulfillReactions=[]),0===r.length)return;return f(r,e.reason),void(this.rejectReactions=[])}}}function f(e,t){for(let r=0;r<e.length;++r){const s=e[r];b(s[0],s[1],s[2],s[3],t)}}function b(e,t,r,s,n){if(!s)return r(n);try{e(s(n))}catch(e){t(e)}}function p(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}function h(e){return c in e}r.Internal=l,r.isPromiseLike=p,r.never=new class e extends Promise{static get[Symbol.species](){return e}constructor(){super(a.noop)}then(){return this}catch(){return this}finally(){return this}}},{"./alias":3,"./global":4,"./noop":5}],"atomic-promise":[function(e,t,r){"use strict";var s=this&&this.__createBinding||(Object.create?function(e,t,r,s){void 0===s&&(s=r),Object.defineProperty(e,s,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,s){void 0===s&&(s=r),e[s]=t[r]}),n=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||s(t,e,r)};Object.defineProperty(r,"__esModule",{value:!0}),n(e("spica/promise"),r)},{"spica/promise":6}]},{},[1,2,"atomic-promise"]),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&module.exports?module.exports=t():e.returnExports=t()}("undefined"!=typeof self?self:this,function(){return require("atomic-promise")}); |
@@ -52,3 +52,3 @@ const gulp = require('gulp'); | ||
} else { | ||
Object.assign(root, factory()); | ||
root.returnExports = factory(); | ||
} | ||
@@ -55,0 +55,0 @@ }(typeof self !== 'undefined' ? self : this, function () { |
{ | ||
"name": "atomic-promise", | ||
"version": "0.0.10", | ||
"version": "0.0.11", | ||
"description": "Promise with no delay.", | ||
@@ -43,3 +43,3 @@ "private": false, | ||
"gulp-unassert": "^2.0.0", | ||
"karma": "^6.1.1", | ||
"karma": "^6.1.2", | ||
"karma-chrome-launcher": "^3.1.0", | ||
@@ -51,8 +51,8 @@ "karma-coverage-istanbul-instrumenter": "^1.0.3", | ||
"karma-mocha": "^2.0.1", | ||
"mocha": "^8.3.0", | ||
"npm-check-updates": "^11.1.10", | ||
"mocha": "^8.3.1", | ||
"npm-check-updates": "^11.2.0", | ||
"power-assert": "^1.6.1", | ||
"spica": "0.0.458", | ||
"spica": "0.0.468", | ||
"tsify": "^5.0.2", | ||
"typescript": "4.3.0-dev.20210302", | ||
"typescript": "4.3.0-dev.20210309", | ||
"vinyl-buffer": "^1.0.1", | ||
@@ -59,0 +59,0 @@ "vinyl-source-stream": "^2.0.0" |
import { AtomicPromise } from '../../index'; | ||
describe('Interface: Package', function () { | ||
describe('global', function () { | ||
it('global', function () { | ||
assert(global['AtomicPromise'] !== AtomicPromise); | ||
}); | ||
}); | ||
describe('AtomicPromise', function () { | ||
it('AtomicPromise', function () { | ||
assert(typeof AtomicPromise === 'function'); | ||
assert(typeof window.AtomicPromise === 'function'); | ||
}); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
468306
11426