diff options
Diffstat (limited to 'dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch')
7 files changed, 0 insertions, 380 deletions
diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/.npmignore b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/History.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/History.md deleted file mode 100644 index 424324a1..00000000 --- a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/History.md +++ /dev/null @@ -1,71 +0,0 @@ - -0.5.1 / 2014-06-19 -================== - - * add repository field to readme (exciting) - -0.5.0 / 2013-07-29 -================== - - * add `.throws(true)` to opt-in to responding with an array of error objects - * make `new` optional - -0.4.0 / 2013-06-05 -================== - - * add catching of immediate callback errors - -0.3.2 / 2013-03-15 -================== - - * remove Emitter call in constructor - -0.3.1 / 2013-03-13 -================== - - * add Emitter() mixin for client. Closes #8 - -0.3.0 / 2013-03-13 -================== - - * add component.json - * add result example - * add .concurrency support - * add concurrency example - * add parallel example - -0.2.1 / 2012-11-08 -================== - - * add .start, .end, and .duration properties - * change dependencies to devDependencies - -0.2.0 / 2012-10-04 -================== - - * add progress events. Closes #5 (__BREAKING CHANGE__) - -0.1.1 / 2012-07-03 -================== - - * change "complete" event to "progress" - -0.1.0 / 2012-07-03 -================== - - * add Emitter inheritance and emit "complete" [burcu] - -0.0.3 / 2012-06-02 -================== - - * Callback results should be in the order of the queued functions. - -0.0.2 / 2012-02-12 -================== - - * any node - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Makefile b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Makefile deleted file mode 100644 index 634e3721..00000000 --- a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Makefile +++ /dev/null @@ -1,6 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should - -.PHONY: test
\ No newline at end of file diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Readme.md b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Readme.md deleted file mode 100644 index f2345c67..00000000 --- a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/Readme.md +++ /dev/null @@ -1,74 +0,0 @@ - -# batch - - Simple async batch with concurrency control and progress reporting. - -## Installation - -``` -$ npm install batch -``` - -## API - -```js -var Batch = require('batch') - , batch = new Batch; - -batch.concurrency(4); - -ids.forEach(function(id){ - batch.push(function(done){ - User.get(id, done); - }); -}); - -batch.on('progress', function(e){ - -}); - -batch.end(function(err, users){ - -}); -``` - -### Progress events - - Contain the "job" index, response value, duration information, and completion data. - -```js -{ index: 1, - value: 'bar', - pending: 2, - total: 3, - complete: 2, - percent: 66, - start: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT), - end: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT), - duration: 0 } -``` - -## License - -(The MIT License) - -Copyright (c) 2013 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/component.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/component.json deleted file mode 100644 index 9bd3e45d..00000000 --- a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/component.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "batch", - "repo": "visionmedia/batch", - "description": "Async task batching", - "version": "0.5.2", - "keywords": ["batch", "async", "utility", "concurrency", "concurrent"], - "dependencies": { - "component/emitter": "*" - }, - "development": {}, - "scripts": [ - "index.js" - ] -} diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/index.js b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/index.js deleted file mode 100644 index c2cbe465..00000000 --- a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/index.js +++ /dev/null @@ -1,158 +0,0 @@ -/** - * Module dependencies. - */ - -try { - var EventEmitter = require('events').EventEmitter; -} catch (err) { - var Emitter = require('emitter'); -} - -/** - * Noop. - */ - -function noop(){} - -/** - * Expose `Batch`. - */ - -module.exports = Batch; - -/** - * Create a new Batch. - */ - -function Batch() { - if (!(this instanceof Batch)) return new Batch; - this.fns = []; - this.concurrency(Infinity); - this.throws(true); - for (var i = 0, len = arguments.length; i < len; ++i) { - this.push(arguments[i]); - } -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -if (EventEmitter) { - Batch.prototype.__proto__ = EventEmitter.prototype; -} else { - Emitter(Batch.prototype); -} - -/** - * Set concurrency to `n`. - * - * @param {Number} n - * @return {Batch} - * @api public - */ - -Batch.prototype.concurrency = function(n){ - this.n = n; - return this; -}; - -/** - * Queue a function. - * - * @param {Function} fn - * @return {Batch} - * @api public - */ - -Batch.prototype.push = function(fn){ - this.fns.push(fn); - return this; -}; - -/** - * Set wether Batch will or will not throw up. - * - * @param {Boolean} throws - * @return {Batch} - * @api public - */ -Batch.prototype.throws = function(throws) { - this.e = !!throws; - return this; -}; - -/** - * Execute all queued functions in parallel, - * executing `cb(err, results)`. - * - * @param {Function} cb - * @return {Batch} - * @api public - */ - -Batch.prototype.end = function(cb){ - var self = this - , total = this.fns.length - , pending = total - , results = [] - , errors = [] - , cb = cb || noop - , fns = this.fns - , max = this.n - , throws = this.e - , index = 0 - , done; - - // empty - if (!fns.length) return cb(null, results); - - // process - function next() { - var i = index++; - var fn = fns[i]; - if (!fn) return; - var start = new Date; - - try { - fn(callback); - } catch (err) { - callback(err); - } - - function callback(err, res){ - if (done) return; - if (err && throws) return done = true, cb(err); - var complete = total - pending + 1; - var end = new Date; - - results[i] = res; - errors[i] = err; - - self.emit('progress', { - index: i, - value: res, - error: err, - pending: pending, - total: total, - complete: complete, - percent: complete / total * 100 | 0, - start: start, - end: end, - duration: end - start - }); - - if (--pending) next(); - else if(!throws) cb(errors, results); - else cb(null, results); - } - } - - // concurrency - for (var i = 0; i < fns.length; i++) { - if (i == max) break; - next(); - } - - return this; -}; diff --git a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/package.json b/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/package.json deleted file mode 100644 index 3d58ce48..00000000 --- a/dgbuilder/dgeflows/node_modules/serve-index/node_modules/batch/package.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "batch", - "version": "0.5.2", - "licenses": [ - { - "type": "MIT" - } - ], - "description": "Simple async batch", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "browser": { - "emitter": "component-emitter" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/batch.git" - }, - "gitHead": "cd69ea173754c0fbd3a7ab33e0a678e6909f3bf3", - "bugs": { - "url": "https://github.com/visionmedia/batch/issues" - }, - "homepage": "https://github.com/visionmedia/batch", - "_id": "batch@0.5.2", - "scripts": {}, - "_shasum": "546543dbe32118c83c7c7ca33a1f5c5d5ea963e9", - "_from": "batch@0.5.2", - "_npmVersion": "2.1.14", - "_nodeVersion": "0.11.14", - "_npmUser": { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - }, - "maintainers": [ - { - "name": "tjholowaychuk", - "email": "tj@vision-media.ca" - } - ], - "dist": { - "shasum": "546543dbe32118c83c7c7ca33a1f5c5d5ea963e9", - "tarball": "http://registry.npmjs.org/batch/-/batch-0.5.2.tgz" - }, - "directories": {}, - "_resolved": "https://registry.npmjs.org/batch/-/batch-0.5.2.tgz" -} |