/* http://github.com/avih/nopromise MIT */
(function(){

var FUNCTION = "function",
    staticNativePromise,
    async = setTimeout;

try {
    staticNativePromise = Promise.resolve(1);
    async = function(f) { staticNativePromise.then(f) };
} catch (e) {}

try {
    async = setImmediate;
} catch (e) {}

try {
    async = process.nextTick || async;
} catch (e) {}


function NoPromise() {
    var _state,
        _output,
        _resolvers = Array();

    return {
        resolve: _resolve,
        reject:  _reject,
        then:    _then
    };

    function _resolve(value) {
        if (!_state) {
            _state = 1;
            _output = value;
            _resolvers.forEach(async);
        }
    }
    function _reject(value) {
        if (!_state) {
            _state = 2;
            _output = value;
            _resolvers.forEach(async);
        }
    }

    function _then(onFulfilled, onRejected) {
        var promise2 = NoPromise();
        _state ? async(promise2Resolver) : _resolvers.push(promise2Resolver);
        return promise2;

        function promise2Resolver() {
            var handler = _state < 2 ? onFulfilled : onRejected;

            if (typeof handler != FUNCTION) {
                (_state < 2 ? promise2.resolve : promise2.reject)(_output);
            } else {
                promise2Resolution(0, handler);
            }
        }

        function promise2Resolution(x, handler) {
            var then,
                done = 0;

            try {
                if (handler)
                    x = handler(_output);

                if (x == promise2) {
                    promise2.reject(TypeError());

                } else if ((typeof x == FUNCTION || x && typeof x == "object")
                           && typeof (then = x.then) == FUNCTION) {
                    then.call(x, function(y) { done++ || promise2Resolution(y) },
                                 function(r) { done++ || promise2.reject(r)    });

                } else {
                    promise2.resolve(x);
                }

            } catch (e) {
                done++ || promise2.reject(e);
            }
        }
    }
}

NoPromise.deferred = function() { var d = NoPromise(); return d.promise = d };
try {
  module.exports = NoPromise;
} catch (e) {
  this.NoPromise = NoPromise;
}

})()
@@ -450,40 +450,52 @@
 ay()
-;%0A
+,
 %0A    
-return %7B%0A        
+    _self = this;%0A%0A    _self.
 resolve
-:
+ =
  _re
@@ -503,25 +503,29 @@
 olve
-,
+;
 %0A    
-    
+_self.
 reject
-:
+  =
   _r
@@ -533,23 +533,29 @@
 ject
-,
+;
 %0A    
-    then:
+_self.then    =
     
@@ -559,22 +559,34 @@
    _then
+;
 %0A    
-%7D
+return _self
 ;%0A%0A    f
@@ -972,16 +972,20 @@
 omise2 =
+ new
  NoPromi
@@ -986,18 +986,16 @@
 oPromise
-()
 ;%0A      
@@ -2233,16 +2233,20 @@
  var d =
+ new
  NoPromi
@@ -2247,18 +2247,16 @@
 oPromise
-()
 ; return

use new instead of object - 600(160)/1220(398)