Skip to content
Browse files

update configuration and index.js

  • Loading branch information...
1 parent fb8d301 commit 281fb45958217ca17fe319e6cf242dc6e78fb0c6 @wizardwerdna committed Apr 3, 2013
Showing with 42 additions and 287 deletions.
  1. +0 −26 bestTick.coffee
  2. +6 −2 covenant.coffee
  3. +25 −250 index.js
  4. +2 −2 index.map
  5. +5 −2 package.json
  6. +2 −1 promise.coffee
  7. +1 −2 test/covenant.coffee
  8. +1 −2 test/promise.coffee
View
26 bestTick.coffee
@@ -1,26 +0,0 @@
-#
-# Utility function to select the most efficient available "yield" operation:
-# nextTick is selected if available, then
-# setImmediate if available, or as a fallback
-# a constructed function using setTimeout with a 0ms delay
-#
-# If your platform is likely to revert to the fallback, it is highly recommended
-# to use a setImmediate polyfil.
-#
-# Version 0.10 of Node changed the semantics of nextTick so that the callback ran
-# before yielding to IO and the eventloop. This high priority rendered a very
-# protective view about "recursive" nextTicking, printing an annoying warning message
-# and a promise to break the code in subsequent versions. Accordingly, an alternative
-# to bestTick that doesn't preempt the event loop (secondBestTick) is also provide
-#
-root = (exports ? this)
-
-root.bestTick =
- (process?.nextTick) or
- (typeof setImmediate == 'function' && setImmediate) or
- (task) -> setTimeout(task, 0)
-
-root.secondBestTick =
- (typeof setImmediate == 'function' && setImmediate) or
- (task) -> setTimeout(task, 0)
-
View
8 covenant.coffee
@@ -1,5 +1,9 @@
root = (exports ? this)
-{bestTick, secondBestTick} = require './bestTick'
+
+root.bestImmediate = bestImmediate =
+ (typeof setImmediate == 'function' && setImmediate) or
+ (task) -> setTimeout(task, 0)
+root.bestTick = bestTick = (process?.nextTick) or root.bestImmediate
class Covenant
constructor: -> @state = new PendingState
@@ -35,7 +39,7 @@ class CompletedState
p2.reject e
_handleFunctionResult: (datum, callback, fallback, p2) ->
if @_isPromise result=callback(datum)
- setImmediate => result.then p2.fulfill, p2.reject
+ bestImmediate => result.then p2.fulfill, p2.reject
else
p2.fulfill result
_isFunction: (thing)-> typeof thing is 'function'
View
275 index.js
@@ -1,30 +1,33 @@
-// Generated by CoffeeScript 1.6.2
+//@ sourceMappingURL=index.map
+// Generated by CoffeeScript 1.6.1
(function() {
- var CompletedState, Covenant, FulfilledState, PendingState, Promise, PromiseStream, RejectedState, Transform, bestTick, root, secondBestTick, _ref,
- __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; },
+ var CompletedState, Covenant, FulfilledState, PendingState, RejectedState, bestImmediate, bestTick, root,
+ _this = this,
__hasProp = {}.hasOwnProperty,
- __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; },
- __slice = [].slice;
+ __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
root = typeof exports !== "undefined" && exports !== null ? exports : this;
- root.bestTick = (typeof process !== "undefined" && process !== null ? process.nextTick : void 0) || (typeof setImmediate === 'function' && setImmediate) || function(task) {
+ root.bestImmediate = bestImmediate = (typeof setImmediate === 'function' && setImmediate) || function(task) {
return setTimeout(task, 0);
};
- root.secondBestTick = (typeof setImmediate === 'function' && setImmediate) || function(task) {
- return setTimeout(task, 0);
- };
-
- root = typeof exports !== "undefined" && exports !== null ? exports : this;
-
- _ref = require('./bestTick'), bestTick = _ref.bestTick, secondBestTick = _ref.secondBestTick;
+ root.bestTick = bestTick = (typeof process !== "undefined" && process !== null ? process.nextTick : void 0) || root.bestImmediate;
Covenant = (function() {
+
function Covenant() {
- this.then = __bind(this.then, this);
- this.reject = __bind(this.reject, this);
- this.fulfill = __bind(this.fulfill, this); this.state = new PendingState;
+ var _this = this;
+ this.then = function(onFulfill, onReject) {
+ return Covenant.prototype.then.apply(_this, arguments);
+ };
+ this.reject = function(reason) {
+ return Covenant.prototype.reject.apply(_this, arguments);
+ };
+ this.fulfill = function(value) {
+ return Covenant.prototype.fulfill.apply(_this, arguments);
+ };
+ this.state = new PendingState;
}
Covenant.prototype.fulfill = function(value) {
@@ -37,7 +40,6 @@
Covenant.prototype.then = function(onFulfill, onReject) {
var p2;
-
p2 = new this.constructor;
this.state._schedule(onFulfill, onReject, p2);
return p2;
@@ -50,6 +52,7 @@
root.Covenant = Covenant;
PendingState = (function() {
+
function PendingState() {
this.pendeds = [];
}
@@ -71,10 +74,10 @@
})();
CompletedState = (function() {
+
function CompletedState(pendeds) {
var pended, _fn, _i, _len,
_this = this;
-
_fn = function(pended) {
return _this._schedule.apply(_this, pended);
};
@@ -101,22 +104,18 @@
};
CompletedState.prototype._handleFunction = function(datum, callback, fallback, p2) {
- var e;
-
try {
return this._handleFunctionResult.apply(this, arguments);
- } catch (_error) {
- e = _error;
+ } catch (e) {
return p2.reject(e);
}
};
CompletedState.prototype._handleFunctionResult = function(datum, callback, fallback, p2) {
var result,
_this = this;
-
if (this._isPromise(result = callback(datum))) {
- return setImmediate(function() {
+ return bestImmediate(function() {
return result.then(p2.fulfill, p2.reject);
});
} else {
@@ -137,6 +136,7 @@
})();
FulfilledState = (function(_super) {
+
__extends(FulfilledState, _super);
function FulfilledState(value, pended) {
@@ -146,7 +146,6 @@
FulfilledState.prototype._schedule = function(onFulfill, __, p2) {
var _this = this;
-
return bestTick(function() {
return _this._do(_this.value, onFulfill, p2.fulfill, p2);
});
@@ -157,6 +156,7 @@
})(CompletedState);
RejectedState = (function(_super) {
+
__extends(RejectedState, _super);
function RejectedState(reason, pended) {
@@ -166,7 +166,6 @@
RejectedState.prototype._schedule = function(__, onReject, p2) {
var _this = this;
-
return bestTick(function() {
return _this._do(_this.reason, onReject, p2.reject, p2);
});
@@ -176,228 +175,4 @@
})(CompletedState);
- root = typeof exports !== "undefined" && exports !== null ? exports : this;
-
- Covenant = require('./covenant').Covenant;
-
- Transform = require('stream').Transform;
-
- PromiseStream = (function(_super) {
- __extends(PromiseStream, _super);
-
- function PromiseStream(promise, options) {
- this.promise = promise;
- this.options = options != null ? options : {
- passthrough: "false"
- };
- this.chunks = null;
- PromiseStream.__super__.constructor.call(this);
- this.on('error', this.promise.reject);
- if (!this.options.passthrough) {
- this.resume();
- }
- this;
- }
-
- PromiseStream.prototype._transform = function(chunk, encoding, callback) {
- this._collect(chunk, encoding, callback);
- if (this.options.passthrough) {
- return callback(null, chunk);
- }
- };
-
- PromiseStream.prototype.end = function() {
- this.promise.fulfill(this._joinCollection);
- return PromiseStream.__super__.end.call(this);
- };
-
- PromiseStream.prototype._collect = function(chunk, encoding, callback) {
- if (this.chunks) {
- return this.chunks += chunk;
- } else {
- return this.chunks = chunk;
- }
- };
-
- PromiseStream.prototype._joinCollection = function() {
- return this.chunks;
- };
-
- return PromiseStream;
-
- })(Transform);
-
- root.PromiseStream = PromiseStream;
-
- Promise = (function(_super) {
- __extends(Promise, _super);
-
- function Promise() {
- this._httpResolver = __bind(this._httpResolver, this);
- this._nodeResolver = __bind(this._nodeResolver, this);
- this.thenable = __bind(this.thenable, this);
- this.resolver = __bind(this.resolver, this);
- this.stream = __bind(this.stream, this); Promise.__super__.constructor.call(this);
- }
-
- Promise.makePromise = function(f) {
- var p;
-
- p = new Promise;
- f(p);
- return p;
- };
-
- Promise.pending = function() {
- return Promise.makePromise(function() {});
- };
-
- Promise.fulfilled = function(value) {
- return Promise.makePromise(function(p) {
- return p.fulfill(value);
- });
- };
-
- Promise.rejected = function(reason) {
- return Promise.makePromise(function(p) {
- return p.reject(reason);
- });
- };
-
- Promise.fromNode = function(f) {
- return function() {
- var args;
-
- args = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
- return Promise.makePromise(function(p) {
- return f.apply(null, __slice.call(args).concat([p._nodeResolver]));
- });
- };
- };
-
- Promise.delay = function(ms) {
- return Promise.makePromise(function(p) {
- setTimeout(p.fulfill, ms);
- return p.always(function() {
- return clearTimeout(t);
- });
- });
- };
-
- Promise.timeout = function(ms, p) {
- return Promise.makePromise(function(p2) {
- var err, t;
-
- err = new Error("timeout after " + ms + " milliseconds");
- t = setTimeout((function() {
- return p.reject(err);
- }), ms);
- p.then(p2.fulfill, p2.reject);
- return p.always(function() {
- return clearTimeout(t);
- });
- });
- };
-
- Promise.when = function() {
- var promises;
-
- promises = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
- return Promise.makePromise(function(pAll) {
- var i, p, _i, _len, _results;
-
- pAll.results = new Array(promises.length);
- pAll.numLeft = promises.length;
- if (promises.length === 0) {
- return pAll.fulfill([]);
- } else {
- _results = [];
- for (i = _i = 0, _len = promises.length; _i < _len; i = ++_i) {
- p = promises[i];
- _results.push((function(p, i) {
- return Promise._scheduleResolution(pAll, p, i);
- })(p, i));
- }
- return _results;
- }
- });
- };
-
- Promise.all = Promise.when;
-
- Promise.prototype.done = function(onFulfill) {
- return this.then(onFulfill);
- };
-
- Promise.prototype.fail = function(onReject) {
- return this.then(null, onReject);
- };
-
- Promise.prototype.always = function(callback) {
- return this.then(callback, callback);
- };
-
- Promise.prototype.stream = function(options) {
- return new PromiseStream(this, options);
- };
-
- Promise.prototype.resolver = function() {
- return {
- reject: this.reject,
- fulfill: this.fulfill
- };
- };
-
- Promise.prototype.thenable = function() {
- return {
- then: this.then,
- done: this.done,
- fail: this.fail,
- always: this.always
- };
- };
-
- Promise._scheduleResolution = function(pAll, valOrPromise, i) {
- if (Promise._isPromise(valOrPromise)) {
- return valOrPromise.then((function(value) {
- return Promise._scheduleResolution(pAll, value, i);
- }), pAll.reject);
- } else {
- pAll.results[i] = valOrPromise;
- if (--pAll.numLeft === 0) {
- return pAll.fulfill(pAll.results);
- }
- }
- };
-
- Promise._isPromise = function(p) {
- return typeof (p != null ? p.then : void 0) === 'function';
- };
-
- Promise.prototype._nodeResolver = function(err, value) {
- if (err) {
- return this.reject(err);
- } else {
- return this.fulfill(value);
- }
- };
-
- Promise.prototype._httpResolver = function(res) {
- if (res.statusCode === 201) {
- return res.pipe(this.stream());
- } else {
- return this.reject(new Error("HTTP status code " + res.statusCode));
- }
- };
-
- return Promise;
-
- }).call(this, Covenant);
-
- root.Promise = Promise;
-
}).call(this);
-
-/*
-//@ sourceMappingURL=index.map
-*/
View
4 index.map
@@ -3,8 +3,8 @@
"file": "index.js",
"sourceRoot": "",
"sources": [
- "index.coffee"
+ "index.js"
],
"names": [],
- "mappings": ";AAeA;CAAA,KAAA,wIAAA;KAAA;;;uBAAA;;CAAA,CAAA,CAAQ,CAAR;;AAIG,CAJH,CAEA,CACE,CADE,CAEsB,CADxB,CAAQ,CADV,CAGG,CADA,EAAA;CACoB,CAAM,EAAjB,MAAA,CAAA;CALZ,EAKE;;AAGC,CARH,CAOA,CACE,CADE,CACsB,CAAvB,GACA,CADA,EAAA,EADH;CAEuB,CAAM,EAAjB,MAAA,CAAA;CATZ,EASE;;CATF,CAYA,CAAQ,CAAR;;CAZA,CAaA,KAA6B,CAA7B,IAA6B,EAb7B;;CAAA,CAeM;CACS,EAAA,CAAA,cAAA;CAAG,kCAAA;CAAA,sCAAA;AAAS,CAAT,EAAS,CAAR,CAAD,CAAA,MAAA,6BAAA;CAAhB,IAAa;;CAAb,EACS,EAAA,EAAT,EAAU;CAAW,EAAQ,CAAR,CAAD,EAAS,MAAT;CADpB,IACS;;CADT,EAEQ,GAAR,GAAS;CAAY,EAAQ,CAAR,CAAD,CAAS,OAAT;CAFpB,IAEQ;;CAFR,CAGkB,CAAZ,CAAN,IAAM,CAAC;CACL,CAAA,QAAA;;AAAK,CAAL,CAAA,CAAK,CAAK,EAAV,KAAA;CAAA,CAC4B,EAA3B,CAAK,CAAN,EAAA,CAAA;CAFI,YAGJ;CANF,IAGM;;CAHN;;CAhBF;;CAAA,CAuBA,CAAgB,CAAZ,IAAJ;;CAvBA,CAyBM;CACS,EAAA,CAAA,kBAAA;CAAG,CAAA,CAAW,CAAV,EAAD,CAAA;CAAhB,IAAa;;CAAb,EACS,EAAA,EAAT,EAAU;CAA6B,CAAO,EAAtB,CAAA,EAAA,MAAA,CAAA;CADxB,IACS;;CADT,E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Y,CAAA,KAAA,CAAX;CACE,SAAA,EAAA;CAAS,EAAA,KAAT,CAAS,IAAT;CAAa,CAAa,CAAd,EAAC,CAAD,EAAA,OAAA;CAAZ,MAAS;CAFZ,IACY;;CADZ;;CAD2B;CApD5B"
}
View
7 package.json
@@ -16,14 +16,17 @@
},
"author": "Andrew C. Greenberg (wizardwerdna@gmail.com)",
"license": "BSD",
- "dependencies": {},
+ "dependencies": {
+ },
"devDependencies": {
"should": "~1.2.2",
"mocha": "~1.8.2",
"promises-aplus-tests": "promises-aplus/promises-tests",
"coffee-script": "~1.6.1",
"jslint": "~0.1.9",
- "uglify-js": "~2.2.5"
+ "uglify-js": "~2.2.5",
+ "coffeeify": "~0.3.0",
+ "browserify": "~2.11.0"
},
"keywords": [
"promise",
View
3 promise.coffee
@@ -1,5 +1,6 @@
root = (exports ? this)
-{Covenant} = require './covenant'
+{bestTick, bestImmediate, Covenant} = require './covenant'
+root.bestTick = bestTick
{Transform} = require 'stream'
class PromiseStream extends Transform
View
3 test/covenant.coffee
@@ -1,6 +1,5 @@
should = require 'should'
-{Covenant} = require('../covenant')
-{bestTick} = require('../bestTick')
+{Covenant, bestTick} = require('../covenant')
# test scaffolding
p = p2 = p3 = returnPromise = callback = null
View
3 test/promise.coffee
@@ -1,6 +1,5 @@
should = require 'should'
-{Promise} = require('../promise')
-{bestTick} = require('../bestTick')
+{Promise, bestTick} = require('../promise')
# test scaffold
p = p1 = p2 = p3 = returnPromise = callback = null

0 comments on commit 281fb45

Please sign in to comment.
Something went wrong with that request. Please try again.