Comparing version 2.2.1 to 2.2.2
@@ -10,3 +10,3 @@ var abbott = require('abbott'); | ||
function isThenable(x){ | ||
return x && typeof x.then === 'function'; | ||
return x && typeof x.then === 'function' && !isRighto(x); | ||
} | ||
@@ -13,0 +13,0 @@ |
{ | ||
"name": "righto", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "directories": { |
@@ -630,2 +630,27 @@ var test = require('tape'), | ||
test('proxy dep', function(t){ | ||
t.plan(1); | ||
if(typeof Proxy === 'undefined'){ | ||
t.pass('Proxy not available'); | ||
return; | ||
} | ||
function getStuff(callback){ | ||
callback(null, {foo: 'foo'}); | ||
} | ||
var stuff = righto.proxy(getStuff); | ||
var foo = stuff.foo | ||
var bar = righto(function(foo, done){ | ||
done(null, foo) | ||
}, foo); | ||
bar(function(error, bar){ | ||
t.equal(bar, 'foo'); | ||
}); | ||
}); | ||
test('resolve', function(t){ | ||
@@ -632,0 +657,0 @@ t.plan(1); |
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
55358
1436