data.future
Advanced tools
Comparing version 2.1.0 to 2.1.1
@@ -39,2 +39,3 @@ // Copyright (c) 2013-2014 Quildreen Motta <quildreen@gmail.com> | ||
var rejected = false | ||
var value = null | ||
@@ -51,4 +52,4 @@ return fold | ||
function fold(g, h) { | ||
return resolved? h(future.value) | ||
: rejected? g(future.value) | ||
return resolved? h(value) | ||
: rejected? g(value) | ||
: started? addToPendingOperations(g, h) | ||
@@ -68,3 +69,3 @@ : /* otherwise */ resolveFuture(g, h) | ||
return f( function(a) { rejected = true | ||
future.value = a | ||
value = a | ||
invokePending('rejected', a) | ||
@@ -74,3 +75,3 @@ return g(a) } | ||
, function(b) { resolved = true | ||
future.value = b | ||
value = b | ||
invokePending('resolved', b) | ||
@@ -77,0 +78,0 @@ return h(b) }) |
{ | ||
"name": "data.future", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "A monad for time-dependant values, providing explicit effects for delayed computations, latency, etc.", | ||
@@ -39,2 +39,2 @@ "main": "lib/index.js", | ||
} | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
2498710
91759
0