Comparing version 0.4.0 to 0.4.1
/** | ||
* @module vow | ||
* @author Filatov Dmitry <dfilatov@yandex-team.ru> | ||
* @version 0.4.0 | ||
* @version 0.4.1 | ||
* @license | ||
@@ -407,2 +407,4 @@ * Dual licensed under the MIT and GPL licenses: | ||
_vow : true, | ||
_resolve : function(val) { | ||
@@ -604,3 +606,3 @@ if(this._status !== PROMISE_STATUS.PENDING) { | ||
* | ||
* @param {Array|Object} iterable | ||
* @param {Array} iterable | ||
* @returns {vow:Promise} | ||
@@ -773,3 +775,3 @@ */ | ||
valueOf : function(value) { | ||
return isVowPromise(value)? value.valueOf() : value; | ||
return value && isFunction(value.valueOf)? value.valueOf() : value; | ||
}, | ||
@@ -785,3 +787,3 @@ | ||
isFulfilled : function(value) { | ||
return isVowPromise(value)? value.isFulfilled() : true; | ||
return value && isFunction(value.isFulfilled)? value.isFulfilled() : true; | ||
}, | ||
@@ -797,3 +799,3 @@ | ||
isRejected : function(value) { | ||
return isVowPromise(value)? value.isRejected() : false; | ||
return value && isFunction(value.isRejected)? value.isRejected() : false; | ||
}, | ||
@@ -809,3 +811,3 @@ | ||
isResolved : function(value) { | ||
return isVowPromise(value)? value.isResolved() : true; | ||
return value && isFunction(value.isResolved)? value.isResolved() : true; | ||
}, | ||
@@ -1214,3 +1216,3 @@ | ||
isVowPromise = function(obj) { | ||
return obj instanceof Promise; | ||
return obj && !!obj._vow; | ||
}, | ||
@@ -1217,0 +1219,0 @@ slice = Array.prototype.slice, |
{ | ||
"name" : "vow", | ||
"version" : "0.4.0", | ||
"version" : "0.4.1", | ||
"description" : "Promises/A+ proposal compatible promises library", | ||
@@ -5,0 +5,0 @@ "homepage" : "https://github.com/dfilatov/vow", |
@@ -7,3 +7,3 @@ **NOTE**. Documentation for old versions of the library can be found at https://github.com/dfilatov/vow/blob/0.3.x/README.md. | ||
Vow is a [Promises/A+](https://github.com/promises-aplus/promises-spec) implementation. | ||
Vow is a [Promises/A+](http://promisesaplus.com/) implementation. | ||
It also supports [DOM Promises](http://dom.spec.whatwg.org/#promises) specification. | ||
@@ -10,0 +10,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
0
48611
4
1135