Comparing version 0.0.6 to 0.0.7
@@ -17,11 +17,7 @@ var EventEmitter = require('events').EventEmitter, | ||
if(listeners.callback) { | ||
listeners.callback.apply(this, args); | ||
} | ||
if(listeners.handle) { | ||
listeners.handle.apply(listeners, args); | ||
} else { | ||
@@ -34,10 +30,7 @@ | ||
if(err) { | ||
listeners.error.call(this, err); | ||
} else | ||
} else | ||
if(listeners.success) { | ||
listeners.success.apply(this, args); | ||
} | ||
@@ -53,29 +46,30 @@ | ||
fn.done = function(fn) { | ||
return fn.callback(fn); | ||
} | ||
fn.handle = function(value) { | ||
return _copy({ handle: value }); | ||
} | ||
fn.vine = function() { | ||
return fn.handle(function(resp) { | ||
if(resp.errors) { | ||
this.error(resp.errors); | ||
} else { | ||
this.success(resp.result); | ||
} | ||
}); | ||
} | ||
fn.callback = function(value) { | ||
return _copy({ callback: value }); | ||
} | ||
fn.success = function(value) { | ||
fn.success = fn.s = function(value) { | ||
return _copy({ success: value }); | ||
} | ||
fn.error = function(value) { | ||
fn.error = fn.e = function(value) { | ||
return _copy({ error: value }); | ||
} | ||
@@ -91,3 +85,2 @@ | ||
if(!globalEmitter.emit('unhandledError', err) && !listeners.callback) throw err; | ||
} | ||
@@ -119,5 +112,3 @@ | ||
module.exports = function(listeners) { | ||
return Chain(listeners); | ||
} | ||
@@ -124,0 +115,0 @@ |
111
outcome.js
@@ -10,3 +10,3 @@ (function(){var require = function (file, cwd) { | ||
return res; | ||
} | ||
}; | ||
@@ -16,3 +16,3 @@ require.paths = []; | ||
require.cache = {}; | ||
require.extensions = [".js",".coffee"]; | ||
require.extensions = [".js",".coffee",".json"]; | ||
@@ -144,6 +144,9 @@ require._core = { | ||
var process = {}; | ||
var global = typeof window !== 'undefined' ? window : {}; | ||
var definedProcess = false; | ||
require.define = function (filename, fn) { | ||
if (require.modules.__browserify_process) { | ||
if (!definedProcess && require.modules.__browserify_process) { | ||
process = require.modules.__browserify_process(); | ||
definedProcess = true; | ||
} | ||
@@ -157,3 +160,10 @@ | ||
var require_ = function (file) { | ||
return require(file, dirname); | ||
var requiredModule = require(file, dirname); | ||
var cached = require.cache[require.resolve(file, dirname)]; | ||
if (cached && cached.parent === null) { | ||
cached.parent = module_; | ||
} | ||
return requiredModule; | ||
}; | ||
@@ -166,3 +176,9 @@ require_.resolve = function (name) { | ||
require_.cache = require.cache; | ||
var module_ = { exports : {} }; | ||
var module_ = { | ||
id : filename, | ||
filename: filename, | ||
exports : {}, | ||
loaded : false, | ||
parent: null | ||
}; | ||
@@ -178,4 +194,6 @@ require.modules[filename] = function () { | ||
filename, | ||
process | ||
process, | ||
global | ||
); | ||
module_.loaded = true; | ||
return module_.exports; | ||
@@ -187,3 +205,3 @@ }; | ||
require.define("path",function(require,module,exports,__dirname,__filename,process){function filter (xs, fn) { | ||
require.define("path",function(require,module,exports,__dirname,__filename,process,global){function filter (xs, fn) { | ||
var res = []; | ||
@@ -322,13 +340,20 @@ for (var i = 0; i < xs.length; i++) { | ||
}; | ||
}); | ||
require.define("__browserify_process",function(require,module,exports,__dirname,__filename,process){var process = module.exports = {}; | ||
require.define("__browserify_process",function(require,module,exports,__dirname,__filename,process,global){var process = module.exports = {}; | ||
process.nextTick = (function () { | ||
var queue = []; | ||
var canSetImmediate = typeof window !== 'undefined' | ||
&& window.setImmediate; | ||
var canPost = typeof window !== 'undefined' | ||
&& window.postMessage && window.addEventListener | ||
; | ||
if (canSetImmediate) { | ||
return function (f) { return window.setImmediate(f) }; | ||
} | ||
if (canPost) { | ||
var queue = []; | ||
window.addEventListener('message', function (ev) { | ||
@@ -343,10 +368,11 @@ if (ev.source === window && ev.data === 'browserify-tick') { | ||
}, true); | ||
} | ||
return function (fn) { | ||
if (canPost) { | ||
return function nextTick(fn) { | ||
queue.push(fn); | ||
window.postMessage('browserify-tick', '*'); | ||
} | ||
else setTimeout(fn, 0); | ||
}; | ||
} | ||
return function nextTick(fn) { | ||
setTimeout(fn, 0); | ||
}; | ||
@@ -374,5 +400,6 @@ })(); | ||
})(); | ||
}); | ||
require.define("events",function(require,module,exports,__dirname,__filename,process){if (!process.EventEmitter) process.EventEmitter = function () {}; | ||
require.define("events",function(require,module,exports,__dirname,__filename,process,global){if (!process.EventEmitter) process.EventEmitter = function () {}; | ||
@@ -386,2 +413,9 @@ var EventEmitter = exports.EventEmitter = process.EventEmitter; | ||
; | ||
function indexOf (xs, x) { | ||
if (xs.indexOf) return xs.indexOf(x); | ||
for (var i = 0; i < xs.length; i++) { | ||
if (x === xs[i]) return i; | ||
} | ||
return -1; | ||
} | ||
@@ -523,3 +557,3 @@ // By default EventEmitters will print a warning if more than | ||
if (isArray(list)) { | ||
var i = list.indexOf(listener); | ||
var i = indexOf(list, listener); | ||
if (i < 0) return this; | ||
@@ -550,5 +584,6 @@ list.splice(i, 1); | ||
}; | ||
}); | ||
require.define("/index.js",function(require,module,exports,__dirname,__filename,process){var EventEmitter = require('events').EventEmitter, | ||
require.define("/index.js",function(require,module,exports,__dirname,__filename,process,global){var EventEmitter = require('events').EventEmitter, | ||
@@ -569,11 +604,7 @@ //used for dispatching unhandledError messages | ||
if(listeners.callback) { | ||
listeners.callback.apply(this, args); | ||
} | ||
if(listeners.handle) { | ||
listeners.handle.apply(listeners, args); | ||
} else { | ||
@@ -586,10 +617,7 @@ | ||
if(err) { | ||
listeners.error.call(this, err); | ||
} else | ||
} else | ||
if(listeners.success) { | ||
listeners.success.apply(this, args); | ||
} | ||
@@ -605,29 +633,30 @@ | ||
fn.done = function(fn) { | ||
return fn.callback(fn); | ||
} | ||
fn.handle = function(value) { | ||
return _copy({ handle: value }); | ||
} | ||
fn.vine = function() { | ||
return fn.handle(function(resp) { | ||
if(resp.errors) { | ||
this.error(resp.errors); | ||
} else { | ||
this.success(resp.result); | ||
} | ||
}); | ||
} | ||
fn.callback = function(value) { | ||
return _copy({ callback: value }); | ||
} | ||
fn.success = function(value) { | ||
fn.success = fn.s = function(value) { | ||
return _copy({ success: value }); | ||
} | ||
fn.error = function(value) { | ||
fn.error = fn.e = function(value) { | ||
return _copy({ error: value }); | ||
} | ||
@@ -643,3 +672,2 @@ | ||
if(!globalEmitter.emit('unhandledError', err) && !listeners.callback) throw err; | ||
} | ||
@@ -671,5 +699,3 @@ | ||
module.exports = function(listeners) { | ||
return Chain(listeners); | ||
} | ||
@@ -708,4 +734,5 @@ | ||
}); | ||
require("/index.js"); | ||
})(); |
@@ -10,3 +10,3 @@ { | ||
"repository": {}, | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"engines": {}, | ||
@@ -13,0 +13,0 @@ "dependencies": {}, |
Sorry, the diff of this file is not supported yet
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
57336
756
11