Comparing version 0.4.4 to 0.4.5
{ | ||
"name": "p-promise", | ||
"main": "p.js", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"homepage": "https://github.com/rkatic/p", | ||
@@ -6,0 +6,0 @@ "authors": [ |
45
p.js
@@ -25,8 +25,24 @@ /*! | ||
var pStartingLine = captureLine(), | ||
var withStack = withStackThrowing, | ||
pStartingLine = captureLine(), | ||
pFileName, | ||
currentTrace = null; | ||
function withStackThrowing( error ) { | ||
if ( !error.stack ) { | ||
try { | ||
throw error; | ||
} catch ( e ) {} | ||
} | ||
return error; | ||
} | ||
if ( new Error().stack ) { | ||
withStack = function( error ) { | ||
return error; | ||
}; | ||
} | ||
function getTrace() { | ||
var stack = new Error().stack; | ||
var stack = withStack( new Error() ).stack; | ||
if ( !stack ) { | ||
@@ -59,3 +75,3 @@ return null; | ||
function captureLine() { | ||
var stack = new Error().stack; | ||
var stack = withStack( new Error() ).stack; | ||
if ( !stack ) { | ||
@@ -107,10 +123,17 @@ return 0; | ||
function makeStackTraceLong( error ) { | ||
if ( | ||
error instanceof Error && | ||
error.stack && | ||
error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 | ||
) { | ||
error.stack = [ filterStackString( error.stack, 0 ) ] | ||
.concat( currentTrace || [] ) | ||
.join(STACK_JUMP_SEPARATOR); | ||
if ( error instanceof Error ) { | ||
var stack = error.stack; | ||
if ( !stack ) { | ||
stack = withStack( error ).stack; | ||
} else if ( ~stack.indexOf(STACK_JUMP_SEPARATOR) ) { | ||
return; | ||
} | ||
if ( stack ) { | ||
error.stack = [ filterStackString( stack, 0 ) ] | ||
.concat( currentTrace || [] ) | ||
.join(STACK_JUMP_SEPARATOR); | ||
} | ||
} | ||
@@ -117,0 +140,0 @@ } |
@@ -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=o(),n,t=null;function r(){var e=(new Error).stack;if(!e){return null}var n=[u(e,1)];if(t){n=n.concat(t);if(n.length===128){n.pop()}}return n}function i(e){var n=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e)||/at ([^ ]+):(\d+):(?:\d+)$/.exec(e)||/@(.+):(\d+):(?:\d+)$/.exec(e);return n?{fileName:n[1],lineNumber:Number(n[2])}:null}function o(){var e=(new Error).stack;if(!e){return 0}var t=e.split("\n");var r=t[0].indexOf("@")>0?t[1]:t[2];var o=i(r);if(!o){return 0}n=o.fileName;return o.lineNumber}function u(e,n){var t=e.split("\n");var r=[];for(var i=n|0,o=t.length;i<o;++i){var u=t[i];if(u&&!a(u)&&!f(u)){r.push(u)}}return r.join("\n")}function a(e){return e.indexOf("(module.js:")!==-1||e.indexOf("(node.js:")!==-1}function f(t){var r=i(t);return!!r&&r.fileName===n&&r.lineNumber>=e&&r.lineNumber<=pn}var l="\nFrom previous event:\n";function s(e){if(e instanceof Error&&e.stack&&e.stack.indexOf(l)===-1){e.stack=[u(e.stack,0)].concat(t||[]).join(l)}}var c=S(typeof process)&&process!=null&&{}.toString.call(process)==="[object process]",v=typeof setImmediate==="function",p=S(typeof MutationObserver)&&MutationObserver||S(typeof WebKitMutationObserver)&&WebKitMutationObserver,d=new j,_=d,h=false,m=0,y=c?A:p?I(E):M(E),w=[],b=M(N),g,x,k=S.call,T=S.apply;_.next=d;function j(){this.a=null;this.b=null;this.next=null}function S(e){return e==="object"||e==="function"}function N(){if(w.length){throw w.shift()}}function E(){while(d!==_){var e=d=d.next;if(m>=1024){_.next=_.next.next}else{++m}var n=e.a;var r=e.b;e.a=null;e.b=null;Z(n,r)}h=false;t=null}function O(e,n){var t=_.next;if(t===d){_.next=t=new j;t.next=d}else{--m}_=t;t.a=e;t.b=n;if(!h){h=true;y()}}function A(){var e=process.domain;if(e){if(!x)x=(1,require)("domain");x.active=process.domain=null}if(h&&v){setImmediate(E)}else{process.nextTick(E)}if(e){x.active=process.domain=e}}function I(e){var n=1;var t=document.createTextNode("");var r=new p(e);r.observe(t,{characterData:true});return function(){n=-n;t.data=n}}function M(e){return function(){var n=setTimeout(r,0);var t=setInterval(r,50);function r(){clearTimeout(n);clearInterval(t);e()}}}if(c){g=function(e){t=null;y();throw e}}else{g=function(e){w.push(e);b()}}var $=0;var K=1;var W=2;var q=-1;var D=-2;var F=-3;function P(e){if(z.onerror){(1,z.onerror)(e)}else{throw e}}function Y(e){if(e._state===W){if(e._domain){e._domain.enter()}g(e._value)}}function z(e){return e instanceof un?e:J(new un,e)}z.longStackSupport=false;function B(e){if(e._pending){V(e,e._op,e._pending);e._pending=null}}function C(e,n){if(e._state){return}e._state=K;e._value=n;B(e)}function G(e,n){if(e._state){return}if(t){s(n)}e._state=W;e._value=n;if(c){e._domain=process.domain}B(e)}function H(e,n){if(n._state){return}n._state=e._state;n._value=e._value;n._domain=e._domain;B(n)}function J(e,n){if(e._state){return e}if(n instanceof un){L(e,n)}else{var t=typeof n;if(t==="object"&&n!==null||t==="function"){Q(e,n)}else{C(e,n)}}return e}function L(e,n){if(n===e){G(e,new TypeError("You can't resolve a promise with itself"))}else if(n._state){H(n,e)}else{X(n,D,e)}}function Q(e,n){var t=R(e,n);if(typeof t==="function"){U(tn(e),t,n)}else{C(e,n)}}function R(e,n){try{return n.then}catch(t){G(e,t);return null}}function U(e,n,t){try{k.call(n,t,e.resolve,e.reject)}catch(r){e.reject(r)}}function V(e,n,t){if(n===q){t(e)}else if(n===D){O(e,t)}else if(n===F){for(var r=0,i=t.length;r<i;r+=2){V(e,t[r],t[r+1])}}else{t(e,n)}}function X(e,n,t){if(e._state){V(e,n,t)}else if(!e._pending){e._pending=t;e._op=n}else if(e._op===F){e._pending.push(n,t)}else{e._pending=[e._op,e._pending,n,t];e._op=F}}function Z(e,n){var r=e._domain||n._domain;t=n._trace;var i=e._state===K?n._cb:n._eb;n._cb=null;n._eb=null;n._domain=null;n._trace=null;if(i===null){H(e,n)}else if(r){if(!r._disposed){r.enter();en(n,i,e._value);r.exit()}}else{en(n,i,e._value)}}function en(e,n,t){var r;try{r=n(t)}catch(i){G(e,i);return}J(e,r)}function nn(e,n){var i=false;var o=z.longStackSupport?r():null;return function(r,u){if(!i){i=true;if(o){if(t){o=null}else{t=o}}if(r){G(e,n?r:u)}else{J(e,u)}if(o){t=null}}}}function tn(e){var n=nn(e,false);return{promise:e,resolve:function(e){n(false,e)},reject:function(e){n(true,e)}}}z.defer=rn;function rn(){return tn(new un)}z.reject=on;function on(e){var n=new un;G(n,e);return n}function un(){this._state=0;this._value=void 0;this._domain=null;this._cb=null;this._eb=null;this._op=0;this._pending=null;this._trace=null}un.prototype.then=function(e,n){var t=new un;t._cb=typeof e==="function"?e:null;t._eb=typeof n==="function"?n:null;if(z.longStackSupport){t._trace=r()}if(c){t._domain=process.domain}if(this._state){O(this,t)}else{X(this,D,t)}return t};un.prototype.done=function(e,n){var t=this;if(e||n){t=t.then(e,n)}t=t.then(null,P);X(t,q,Y)};un.prototype.fail=function(e){return this.then(null,e)};un.prototype.spread=function(e,n){return this.then(fn).then(function(n){return T.call(e,void 0,n)},n)};un.prototype.timeout=function(e,n){var i=new un;if(this._state!==$){H(this,i)}else{var o=z.longStackSupport?r():null;var u=setTimeout(function(){t=o;G(i,new Error(n||"Timed out after "+e+" ms"))},e);X(this,q,function(e){clearTimeout(u);H(e,i)})}return i};un.prototype.delay=function(e){var n=new un;X(this,q,function(t){if(t._state===K){setTimeout(function(){H(t,n)},e)}else{H(t,n)}});return n};un.prototype.all=function(){return this.then(fn)};un.prototype.allSettled=function(){return this.then(an)};un.prototype.inspect=function(){switch(this._state){case $:return{state:"pending"};case K:return{state:"fulfilled",value:this._value};case W:return{state:"rejected",reason:this._value};default:throw new TypeError("invalid state")}};un.prototype.nodeify=function(e){if(e){this.done(function(n){e(null,n)},e);return void 0}else{return this}};z.allSettled=an;function an(e){var n=new un;var t=e.length;if(typeof t!=="number"){G(n,new TypeError("input not array-like"));return n}var r=new Array(t);var i=t;function o(e,t){r[t]=e.inspect();if(--i===0){C(n,r)}}for(var u=0;u<t;++u){X(z(e[u]),u,o)}if(i===0){C(n,r)}return n}z.all=fn;function fn(e){var n=new un;var t=e.length;if(typeof t!=="number"){G(n,new TypeError("input not array-like"));return n}var r=new Array(t);var i=t;function o(e,t){if(r!==null){if(e._state===W){r=null;H(e,n)}else{r[t]=e._value;if(--i===0){C(n,r)}}}}for(var u=0;u<t;++u){X(z(e[u]),u,o)}if(i===0){C(n,r)}return n}z.spread=ln;function ln(e,n,t){return fn(e).then(function(e){return T.call(n,void 0,e)},t)}z.promised=sn;function sn(e){function n(n){return k.apply(e,n)}return function(){var e=arguments.length;var t=new Array(e+1);t[0]=this;for(var r=0;r<e;++r){t[r+1]=arguments[r]}return fn(t).then(n)}}z.denodeify=cn;function cn(e){return function(){var n=new un;var t=arguments.length;var r=new Array(t+1);r[t]=nn(n,true);while(t--){r[t]=arguments[t]}T.call(e,this,r);return n}}z.onerror=null;z.nextTick=function dn(e){var n=new un;C(n,e);n=n.then(vn);X(n,q,Y)};function vn(e){e.call()}var pn=o();return z}); | ||
(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=i,n=a(),t,r=null;function i(e){if(!e.stack){try{throw e}catch(n){}}return e}if((new Error).stack){e=function(e){return e}}function o(){var n=e(new Error).stack;if(!n){return null}var t=[f(n,1)];if(r){t=t.concat(r);if(t.length===128){t.pop()}}return t}function u(e){var n=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(e)||/at ([^ ]+):(\d+):(?:\d+)$/.exec(e)||/@(.+):(\d+):(?:\d+)$/.exec(e);return n?{fileName:n[1],lineNumber:Number(n[2])}:null}function a(){var n=e(new Error).stack;if(!n){return 0}var r=n.split("\n");var i=r[0].indexOf("@")>0?r[1]:r[2];var o=u(i);if(!o){return 0}t=o.fileName;return o.lineNumber}function f(e,n){var t=e.split("\n");var r=[];for(var i=n|0,o=t.length;i<o;++i){var u=t[i];if(u&&!l(u)&&!c(u)){r.push(u)}}return r.join("\n")}function l(e){return e.indexOf("(module.js:")!==-1||e.indexOf("(node.js:")!==-1}function c(e){var r=u(e);return!!r&&r.fileName===t&&r.lineNumber>=n&&r.lineNumber<=hn}var s="\nFrom previous event:\n";function v(n){if(n instanceof Error){var t=n.stack;if(!t){t=e(n).stack}else if(~t.indexOf(s)){return}if(t){n.stack=[f(t,0)].concat(r||[]).join(s)}}}var p=N(typeof process)&&process!=null&&{}.toString.call(process)==="[object process]",d=typeof setImmediate==="function",h=N(typeof MutationObserver)&&MutationObserver||N(typeof WebKitMutationObserver)&&WebKitMutationObserver,_=new E,m=_,y=false,w=0,b=p?M:h?$(A):K(A),g=[],x=K(O),k,T,j=N.call,S=N.apply;m.next=_;function E(){this.a=null;this.b=null;this.next=null}function N(e){return e==="object"||e==="function"}function O(){if(g.length){throw g.shift()}}function A(){while(_!==m){var e=_=_.next;if(w>=1024){m.next=m.next.next}else{++w}var n=e.a;var t=e.b;e.a=null;e.b=null;nn(n,t)}y=false;r=null}function I(e,n){var t=m.next;if(t===_){m.next=t=new E;t.next=_}else{--w}m=t;t.a=e;t.b=n;if(!y){y=true;b()}}function M(){var e=process.domain;if(e){if(!T)T=(1,require)("domain");T.active=process.domain=null}if(y&&d){setImmediate(A)}else{process.nextTick(A)}if(e){T.active=process.domain=e}}function $(e){var n=1;var t=document.createTextNode("");var r=new h(e);r.observe(t,{characterData:true});return function(){n=-n;t.data=n}}function K(e){return function(){var n=setTimeout(r,0);var t=setInterval(r,50);function r(){clearTimeout(n);clearInterval(t);e()}}}if(p){k=function(e){r=null;b();throw e}}else{k=function(e){g.push(e);x()}}var W=0;var q=1;var D=2;var F=-1;var P=-2;var Y=-3;function z(e){if(C.onerror){(1,C.onerror)(e)}else{throw e}}function B(e){if(e._state===D){if(e._domain){e._domain.enter()}k(e._value)}}function C(e){return e instanceof fn?e:Q(new fn,e)}C.longStackSupport=false;function G(e){if(e._pending){Z(e,e._op,e._pending);e._pending=null}}function H(e,n){if(e._state){return}e._state=q;e._value=n;G(e)}function J(e,n){if(e._state){return}if(r){v(n)}e._state=D;e._value=n;if(p){e._domain=process.domain}G(e)}function L(e,n){if(n._state){return}n._state=e._state;n._value=e._value;n._domain=e._domain;G(n)}function Q(e,n){if(e._state){return e}if(n instanceof fn){R(e,n)}else{var t=typeof n;if(t==="object"&&n!==null||t==="function"){U(e,n)}else{H(e,n)}}return e}function R(e,n){if(n===e){J(e,new TypeError("You can't resolve a promise with itself"))}else if(n._state){L(n,e)}else{en(n,P,e)}}function U(e,n){var t=V(e,n);if(typeof t==="function"){X(on(e),t,n)}else{H(e,n)}}function V(e,n){try{return n.then}catch(t){J(e,t);return null}}function X(e,n,t){try{j.call(n,t,e.resolve,e.reject)}catch(r){e.reject(r)}}function Z(e,n,t){if(n===F){t(e)}else if(n===P){I(e,t)}else if(n===Y){for(var r=0,i=t.length;r<i;r+=2){Z(e,t[r],t[r+1])}}else{t(e,n)}}function en(e,n,t){if(e._state){Z(e,n,t)}else if(!e._pending){e._pending=t;e._op=n}else if(e._op===Y){e._pending.push(n,t)}else{e._pending=[e._op,e._pending,n,t];e._op=Y}}function nn(e,n){var t=e._domain||n._domain;r=n._trace;var i=e._state===q?n._cb:n._eb;n._cb=null;n._eb=null;n._domain=null;n._trace=null;if(i===null){L(e,n)}else if(t){if(!t._disposed){t.enter();tn(n,i,e._value);t.exit()}}else{tn(n,i,e._value)}}function tn(e,n,t){var r;try{r=n(t)}catch(i){J(e,i);return}Q(e,r)}function rn(e,n){var t=false;var i=C.longStackSupport?o():null;return function(o,u){if(!t){t=true;if(i){if(r){i=null}else{r=i}}if(o){J(e,n?o:u)}else{Q(e,u)}if(i){r=null}}}}function on(e){var n=rn(e,false);return{promise:e,resolve:function(e){n(false,e)},reject:function(e){n(true,e)}}}C.defer=un;function un(){return on(new fn)}C.reject=an;function an(e){var n=new fn;J(n,e);return n}function fn(){this._state=0;this._value=void 0;this._domain=null;this._cb=null;this._eb=null;this._op=0;this._pending=null;this._trace=null}fn.prototype.then=function(e,n){var t=new fn;t._cb=typeof e==="function"?e:null;t._eb=typeof n==="function"?n:null;if(C.longStackSupport){t._trace=o()}if(p){t._domain=process.domain}if(this._state){I(this,t)}else{en(this,P,t)}return t};fn.prototype.done=function(e,n){var t=this;if(e||n){t=t.then(e,n)}t=t.then(null,z);en(t,F,B)};fn.prototype.fail=function(e){return this.then(null,e)};fn.prototype.spread=function(e,n){return this.then(cn).then(function(n){return S.call(e,void 0,n)},n)};fn.prototype.timeout=function(e,n){var t=new fn;if(this._state!==W){L(this,t)}else{var i=C.longStackSupport?o():null;var u=setTimeout(function(){r=i;J(t,new Error(n||"Timed out after "+e+" ms"))},e);en(this,F,function(e){clearTimeout(u);L(e,t)})}return t};fn.prototype.delay=function(e){var n=new fn;en(this,F,function(t){if(t._state===q){setTimeout(function(){L(t,n)},e)}else{L(t,n)}});return n};fn.prototype.all=function(){return this.then(cn)};fn.prototype.allSettled=function(){return this.then(ln)};fn.prototype.inspect=function(){switch(this._state){case W:return{state:"pending"};case q:return{state:"fulfilled",value:this._value};case D:return{state:"rejected",reason:this._value};default:throw new TypeError("invalid state")}};fn.prototype.nodeify=function(e){if(e){this.done(function(n){e(null,n)},e);return void 0}else{return this}};C.allSettled=ln;function ln(e){var n=new fn;var t=e.length;if(typeof t!=="number"){J(n,new TypeError("input not array-like"));return n}var r=new Array(t);var i=t;function o(e,t){r[t]=e.inspect();if(--i===0){H(n,r)}}for(var u=0;u<t;++u){en(C(e[u]),u,o)}if(i===0){H(n,r)}return n}C.all=cn;function cn(e){var n=new fn;var t=e.length;if(typeof t!=="number"){J(n,new TypeError("input not array-like"));return n}var r=new Array(t);var i=t;function o(e,t){if(r!==null){if(e._state===D){r=null;L(e,n)}else{r[t]=e._value;if(--i===0){H(n,r)}}}}for(var u=0;u<t;++u){en(C(e[u]),u,o)}if(i===0){H(n,r)}return n}C.spread=sn;function sn(e,n,t){return cn(e).then(function(e){return S.call(n,void 0,e)},t)}C.promised=vn;function vn(e){function n(n){return j.apply(e,n)}return function(){var e=arguments.length;var t=new Array(e+1);t[0]=this;for(var r=0;r<e;++r){t[r+1]=arguments[r]}return cn(t).then(n)}}C.denodeify=pn;function pn(e){return function(){var n=new fn;var t=arguments.length;var r=new Array(t+1);r[t]=rn(n,true);while(t--){r[t]=arguments[t]}S.call(e,this,r);return n}}C.onerror=null;C.nextTick=function _n(e){var n=new fn;H(n,e);n=n.then(dn);en(n,F,B)};function dn(e){e.call()}var hn=a();return C}); |
{ | ||
"name": "p-promise", | ||
"version": "0.4.4", | ||
"version": "0.4.5", | ||
"description": "A simple Promises/A+ library.", | ||
@@ -18,6 +18,6 @@ "author": "Robert Katić <robert.katic@gmail.com> (https://github.com/rkatic)", | ||
"test-own": "mocha --reporter dot -s 200 test/test.js", | ||
"test-trace": "node -allow-natives-syntax test/test-and-trace.js", | ||
"opt": "node -allow-natives-syntax test/test-and-trace.js", | ||
"test-aplus": "promises-aplus-tests test/adapter --reporter dot", | ||
"test": "npm run test-aplus && npm run test-own", | ||
"test-local": "npm test && npm run minify" | ||
"test-final": "npm test && npm run opt && npm run minify" | ||
}, | ||
@@ -24,0 +24,0 @@ "keywords": [ |
@@ -1,2 +0,3 @@ | ||
--- AUTO GENERATED CONTENT --- (2014/6/31 2:10:10) | ||
--- AUTO GENERATED CONTENT --- (2014/6/31 4:10:24) | ||
withStackThrowing : not optimized : 0 | ||
getTrace : not optimized : 0 | ||
@@ -3,0 +4,0 @@ getFileNameAndLineNumber : not optimized : 0 |
@@ -25,8 +25,24 @@ /*! | ||
var pStartingLine = captureLine(), | ||
var withStack = withStackThrowing, | ||
pStartingLine = captureLine(), | ||
pFileName, | ||
currentTrace = null; | ||
TRACE_FUNCTIONS.fn = withStackThrowing; function withStackThrowing( error ) { | ||
if ( !error.stack ) { | ||
try { | ||
throw error; | ||
} catch ( e ) {} | ||
} | ||
return error; | ||
} | ||
if ( new Error().stack ) { | ||
withStack = function( error ) { | ||
return error; | ||
}; | ||
} | ||
TRACE_FUNCTIONS.fn = getTrace; function getTrace() { | ||
var stack = new Error().stack; | ||
var stack = withStack( new Error() ).stack; | ||
if ( !stack ) { | ||
@@ -59,3 +75,3 @@ return null; | ||
TRACE_FUNCTIONS.fn = captureLine; function captureLine() { | ||
var stack = new Error().stack; | ||
var stack = withStack( new Error() ).stack; | ||
if ( !stack ) { | ||
@@ -107,10 +123,17 @@ return 0; | ||
TRACE_FUNCTIONS.fn = makeStackTraceLong; function makeStackTraceLong( error ) { | ||
if ( | ||
error instanceof Error && | ||
error.stack && | ||
error.stack.indexOf(STACK_JUMP_SEPARATOR) === -1 | ||
) { | ||
error.stack = [ filterStackString( error.stack, 0 ) ] | ||
.concat( currentTrace || [] ) | ||
.join(STACK_JUMP_SEPARATOR); | ||
if ( error instanceof Error ) { | ||
var stack = error.stack; | ||
if ( !stack ) { | ||
stack = withStack( error ).stack; | ||
} else if ( ~stack.indexOf(STACK_JUMP_SEPARATOR) ) { | ||
return; | ||
} | ||
if ( stack ) { | ||
error.stack = [ filterStackString( stack, 0 ) ] | ||
.concat( currentTrace || [] ) | ||
.join(STACK_JUMP_SEPARATOR); | ||
} | ||
} | ||
@@ -117,0 +140,0 @@ } |
@@ -476,24 +476,29 @@ (function(){ | ||
var hasStacks = !!( new Error().stack ); | ||
function createError( msg ) { | ||
try { | ||
throw new Error( msg ); | ||
} catch ( e ) { | ||
return e; | ||
} | ||
} | ||
function checkError( error, expectedNamesStr ) { | ||
expect( error instanceof Error ).to.be( true ); | ||
if ( hasStacks ) { | ||
var stacks = error.stack | ||
.split("_it_")[0] | ||
.split("\nFrom previous event:\n"); | ||
var stacks = error.stack | ||
.split("_it_")[0] | ||
.split("\nFrom previous event:\n"); | ||
var str = map(stacks, function( stack ) { | ||
return ( stack.match(/_(\w+)_/g) || [] ) | ||
.join("") | ||
.split("__").join("-") | ||
.slice(1, -1); | ||
}) | ||
.join(" ") | ||
.replace(/^\s+|\s+$/g, "") | ||
.replace(/\s+/g, " "); | ||
var str = map(stacks, function( stack ) { | ||
return ( stack.match(/_(\w+)_/g) || [] ) | ||
.join("") | ||
.split("__").join("-") | ||
.slice(1, -1); | ||
}) | ||
.join(" ") | ||
.replace(/^\s+|\s+$/g, "") | ||
.replace(/\s+/g, " "); | ||
expect( str ).to.be( expectedNamesStr ); | ||
} | ||
expect( str ).to.be( expectedNamesStr ); | ||
} | ||
@@ -507,3 +512,3 @@ | ||
cb({then: function _1_( cb, eb ) { | ||
eb( new Error() ); | ||
eb( createError() ); | ||
}}); | ||
@@ -529,3 +534,3 @@ }}; | ||
eb( new Error() ); | ||
}); | ||
}, 0); | ||
}}); | ||
@@ -532,0 +537,0 @@ }}); |
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
2182769
2999